On 8 Dec 2016, at 14:01, Thomas Mortagne
<thomas.mortagne(a)xwiki.com> wrote:
On Thu, Dec 8, 2016 at 1:46 PM, Vincent Massol <vincent(a)massol.net> wrote:
Hi devs,
The story
========
1) We introduced some new translations keys in
https://github.com/xwiki/xwiki-platform/commit/5c50e2e88bb7cf592c1ecedcf0f3…
That was done in XWIKI-12431 (Adapt the "rename" action for nested documents),
i.e. in 7.2M3
2) We modified the keys in
https://github.com/xwiki/xwiki-platform/commit/12ec17d1c486935162581d47bbf1…
That was done in XWIKI-13067 ("Rename: Change the label to make it clear that both
links and backlinks are updated or have 2 separate options”), i.e. in XWiki 8.0-rc-1,
7.4.3
3) The consequence is that all translations got broken, resulting in problems such as
http://jira.xwiki.org/browse/XINFRA-219. However this issue reports the issue only for
French but it’s likely that it broke the translations for other languages.
The learnings
===========
1) We must never change the format of existing translation keys. This is the equivalent
of breaking an API. Instead we need to go through deprecation of existing keys and
introduction of new keys, even though it’s a pain.
http://dev.xwiki.org/xwiki/bin/view/Community/DevelopmentPractices#HTransla…
would probably benefit from additional explanations too.
Well this is not really new and it's already our rule.
That’s precisely my point! It’s our rule but it’s not documented.
Thanks
-Vincent
2) We would need a tool in the quality profile of our build/CI that would break the build
if someone changes the format of a translation.Easiest would be a tool that compares the
English translations on master vs the last released version and breaks if there’s a
difference in parameter (i.e. {N} syntax).
3) We need to decide if A) we keep the current change done in XWIKI-13067 or B) revert
them and revert/adapt the changes already brought to some translations keys (as it was
done for FR). For this we need to evaluate the extent of the damage.
Any volunteer for 3)? :)
Thanks
-Vincent
--
Thomas Mortagne