Why didn’t you give me a link right away, want to torture me? I write the opuses for kilometers here …
Looks like I’m talking about this:
Using the static Resource Bundles
I checked the ApplicationResources_ru.properties file from xwiki-platform-legacy-oldcore-11.0.3.jar and found the following (see screenshot):
This is just one example of the reuse of string resources for the word “Delete” (for different modules). I will find many such examples with other frequently repeated words (often used repeated resources)!
I correctly understand that the ApplicationResources_XX.properties file is generated using Weblate and assistants from different countries had to translate “Delete” into their own language about 19 times?
With the advent of the new application (module) using the word “Delete”, the developer will insert one or more string resources “Delete” to fit his needs … And the friendly team of translators will rush to Weblate to translate this word again?
And here is what I suggest:
delete=resource.getStringTranslated(STR_RES_DELETE)
core.shortcuts.view.delete=resource.getStringTranslated(STR_RES_DELETE)
core.menu.delete=resource.getStringTranslated(STR_RES_DELETE)
core.menu.space.delete=resource.getStringTranslated(STR_RES_DELETE)
and many, many etc
And then these string resources either should not fall into the translation systems at all (defined only in the application code), or should not be translated into the translation systems (then translators should know that such a string should not be translated).
And the STR_RES_DELETE resource has already been translated only once in different languages and stored somewhere else (in the file, in the database - cool !!!)
Here!
P.S.
And it is not at all obligatory to insert the DELETE resource into other string resources, for example, long sentences. Let long sentences be translated by translation systems as Weblate.
Are you sure you want to delete this post?