Hi all,

In https://bugzilla.mozilla.org/show_bug.cgi?id=1193059 we encountered a 
difference in perspective between our current model of thinking and L20n 
approach in handling en-US translation changes that I think is worth discussing 
in the context of L20n approach.

Basically, historically en-US entity was a reference point for translation 
entities and we were forcing entity ID change whenever en-US string changed.

The canonical example goes like this:

1) Entity <foo "Hello World"> in en-US gets changed to "<foo2 "Good morning 
World">
2) Localizers see obsolete entity "foo" and new entity "foo2" and they know 
they need to translate the new one and remove the old one

It brought us to extreme because we need to be caution and there were cases 
where non-semantic changes to en-US triggered id changes. Example:

1) Entity <foo "Whats up {{$user}}"> in en-US gets a spelling fixed to "<foo 
"What's up {{$user}}"> and a comma added
2) We demand ID update.

I'd argue that even in .properties model we should *not* change the ID in this 
scenario because the semantic meaning of the entity <foo> remains the same and 
all translations should be valid and not need any changes.

Another example is in the bug linked above, where we switch to using a 
placeable in en-US but the value of the entity doesn't change.

Now, in L20n world that of course goes *much* further. One of the paradigms 
changes we bring with L20n is breaking the 1-1 coupling between en-US and 
localizations, and one of the aspects of that is that en-US may have different 
form than localizations.
Example:

1) en-US strings is added: 

<foo "There are {{$number}} messages">

2) localizations translate entity <foo>

3) en-US copy is updated to look better for "zero" case:

<foo[$number == 0 ? 'zero' : 'other'] {
  zero: "There are no new messages",
  other: "There are {{$number}} messages"
}>

I believe that in L20n paradigm this should *not* warrant entity ID change.

The rationale is like this:

Entity with ID "foo" is a social contract between the developer and the 
localizer. The developer is saying "foo" will be displayed in place X in UI and 
I will provide you variable "$number" which will be an integer and you should 
provide me a string that says how many new messages are there.

In some languages the "There are {{$number}} messages" may be better for all 
cases, in others the special case for zero may look better.

en-US is becoming one of the languages and we should not bind the social 
contract to the en-US copy, but to the semantic meaning and location of the 
entity.

The same way as en-US may be a Hash with plural index, and de may be a string, 
en-US may also be modified from being a string to be a hash or back, and it 
shouldn't trigger automatic invalidation of translations.

What do you guys think?
zb.
_______________________________________________
tools-l10n mailing list
[email protected]
https://lists.mozilla.org/listinfo/tools-l10n

Reply via email to