You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It'd be great to be able to categorise a translation so a subset of translations could be handled separately. My site has an administration backend that needs to have different translations available to that of the public site.
Currently, PostBuild dumps all the translations in to a single file messages.pot/messages.po and only these files are used to display translations. It would be nice if multiple translation files could be generated and used based on a single in a nugget. Perhaps something like this:
[[[This translation is the default case]]]
[[[This translation is a special case\\\specialcase]]]
[[[This translation is another special case\\\specialcase]]]
The first nugget would be added to the default messages.pot and the others generate .pot/.po files based on the key specified in the nugget:
messages.pot
- This translation is the default case
specialcase.pot
- This translation is a special case
- This translation is another special case
Because all translations are currently dumped in a single file, translators are required to sift through all translations as many may not be relevant for them. Unless I add comments to each nugget, this is often an impossible task. It would be a better experience for the translators for me to send them a single .po file and they can just simply translate them all.
I understand that reading multiple .po files is already supported (i18n.LocaleOtherFiles) so perhaps this just needs to be an improvement to PostBuild that allows it to generate the separate PO databases. The changes added in #314 may be useful here and to many, may be a more elegant approach.
The text was updated successfully, but these errors were encountered:
Here is a start for doing this.
I didn't submit a PR because it still has some issues :
A context and a comment are stored in the same list which can lead to strange behaviours if there are manually written comments in the po files. In my opinion, there should be a clear separation between comments and contextes.
When the option is activated, the default po[t] file contains only tokens with no context at all (ie : if a nugget have a "contextless" version and another one with a context, the contextless version is skipped)
If a context have the same name of the default po[t] file, one of the files will be overwritten during generation
It'd be great to be able to categorise a translation so a subset of translations could be handled separately. My site has an administration backend that needs to have different translations available to that of the public site.
Currently, PostBuild dumps all the translations in to a single file
messages.pot
/messages.po
and only these files are used to display translations. It would be nice if multiple translation files could be generated and used based on a single in a nugget. Perhaps something like this:The first nugget would be added to the default
messages.pot
and the others generate.pot
/.po
files based on the key specified in the nugget:Because all translations are currently dumped in a single file, translators are required to sift through all translations as many may not be relevant for them. Unless I add comments to each nugget, this is often an impossible task. It would be a better experience for the translators for me to send them a single
.po
file and they can just simply translate them all.I understand that reading multiple
.po
files is already supported (i18n.LocaleOtherFiles) so perhaps this just needs to be an improvement to PostBuild that allows it to generate the separate PO databases. The changes added in #314 may be useful here and to many, may be a more elegant approach.The text was updated successfully, but these errors were encountered: