Opened on 01/05/2018 at 05:44:35 PM
Closed on 01/19/2018 at 08:07:37 PM
#6231 closed change (fixed)
[CMS] Add tests for translation string substitution
Reported by: | kvas | Assignee: | kvas |
---|---|---|---|
Priority: | P3 | Milestone: | |
Module: | Sitescripts | Keywords: | |
Cc: | jsonesen | Blocked By: | |
Blocking: | Platform: | Unknown / Cross platform | |
Ready: | no | Confidential: | no |
Tester: | Unknown | Verified working: | no |
Review URL(s): |
Description
Background
Translation string substitution is one of the most complicated parts of CMS codebase. Apart from the base functionality there is a number of additional features:
- Fixed text: #2112,
- Default translations: #2133,
- Nested translations: #2139,
- Resolving links in translation strings: #2323,
- Reuse of default values: #2936,
and possibly something else that I have missed, as well as interesting corner cases that have lead to bugs before:
- Extra semicolons being added to translatable strings #2450,
- Translatable attributes are escaped twice #2457.
At the same time, we only have one test for translation string substitution and it only checks the basic functionality. This is not enough.
What to change
Add tests for the aforementioned features and bugs. Check if they cover the entirety of the code that does translation string substitution and cover any missing bits too.
Implementation notes
Existing testing framework based on testing source pages and expected outputs should be sufficient for the testing of translation string substitution. Try to stick to it without adding any Python code and keep the new additions down to a small number of pages as much as possible.
Attachments (0)
Change History (5)
comment:1 Changed on 01/08/2018 at 11:57:14 AM by kvas
- Cc jsonesen added
comment:2 Changed on 01/08/2018 at 03:00:07 PM by kvas
- Owner set to kvas
comment:3 Changed on 01/19/2018 at 04:56:25 PM by kvas
- Review URL(s) modified (diff)
- Status changed from new to reviewing
comment:4 Changed on 01/19/2018 at 08:06:24 PM by abpbot
comment:5 Changed on 01/19/2018 at 08:07:37 PM by kvas
- Resolution set to fixed
- Status changed from reviewing to closed
A commit referencing this issue has landed:
Issue 6231 - Add tests for translation string substitution