[Wikitech-l] Re: Moving special page alias translations to JSON

2023-12-04 Thread apatro
Like Bartosz Dziewoński said, this should not be affected. There should not be 
any difference between PHP and JSON files in terms of possibility of 
customization
___
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/

[Wikitech-l] Re: Moving special page alias translations to JSON

2023-12-04 Thread Bartosz Dziewoński

On 2023-11-30 21:18, Bináris wrote:
A PHP file can be individual for each wiki installation, while 
Translatewiki will force all wikis of the same language to use the same 
translations.

Am I right?


I think this doesn't actually change.

Today, individual wikis can only customize the namespace names (using 
$wgExtraNamespaces), and all other translateable items (like special 
page and magic word names) are the same across all projects in the same 
language.


It seems to me that this will continue working in exactly the same way, 
and only the format is changed from PHP code to JSON.


--
Bartosz Dziewoński
___
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/

[Wikitech-l] Re: Moving special page alias translations to JSON

2023-12-04 Thread apatro
Thank you for your feedback!

> My only "complaint" is the folder name "config". But that might just
be part of the example patch.

That was a correct assumption. I've now updated the name of the parameter to 
`TranslationAliasesDirs` and renamed the name of that folder to `aliases`

> Why can't we make the new structure
part of the existing i18n/en.json file? Or if you really think the
separation is beneficial, why not have separate folders for
"specialpagealiases", "magicwords", and so on?

The main reason for separation was the concerns highlighted here: 
https://phabricator.wikimedia.org/T89947#8210010

Another couple of reasons are related to change tracking being cleaner if these 
are in their own files and it being easier for translatewiki
to process these files and perform stricter validation for them.

>  Or if you really think the
separation is beneficial, why not have separate folders for
"specialpagealiases", "magicwords", and so on?

That would be possible with the current format:
```
"TranslationAliasesDirs": {
"TranslationNotificationsSpecialPageAlias": "i18n/aliases/",
"TranslationNotificationsSpecialMagicWords": "i18n/magicWords/",
"TranslationNotificationsSpecialNamespaceAlias": 
"i18n/namespaceAlias/"
}
```

> This makes it a lot more flexible for any unpredictable future
addition. However, I would make it uppercase "SpecialPageAliases" to
be closer to how extension.json works.

This should be doable. I'll check it out.
___
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/


[Wikitech-l] Re: Moving special page alias translations to JSON

2023-11-30 Thread Bináris
I like this idea, but:
A PHP file can be individual for each wiki installation, while
Translatewiki will force all wikis of the same language to use the same
translations.
Am I right?
___
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/

[Wikitech-l] Re: Moving special page alias translations to JSON

2023-11-30 Thread Thiemo Kreuz
Love it!  It's almost a 100% literal translation of the existing
.alias.php format, which makes it very easy to learn, even using old
documentation.

The only difference is that the language is not in the array structure
any more, but in the "en.json" filename, which makes it behave the
same as the existing i18n system. That's superb! 

This also makes it much easier to argue how and why en.json is
different from the others.

My only "complaint" is the folder name "config". But that might just
be part of the example patch. "Config" is rather meaningless. One
could argue that everything is configuration, even the existing
localizations in i18n/en.json. Why can't we make the new structure
part of the existing i18n/en.json file? Or if you really think the
separation is beneficial, why not have separate folders for
"specialpagealiases", "magicwords", and so on?

Having the extra "specialPageAliases" key in the JSON is fine either
way. This makes it a lot more flexible for any unpredictable future
addition. However, I would make it uppercase "SpecialPageAliases" to
be closer to how extension.json works.

Best
Thiemo
___
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/