New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spec: Define whether <languages> should list en_US explicitly #345
Comments
|
My assumption was always that the default language was C == en_US. |
|
Yeah, and that’s a good assumption, but I can’t find anything in gettext which actually requires C == en_US. I might be missing it, or it might be the case that there’s a handful of apps out there where C is French or German or whatever. |
|
I actually came across a project where C was German, and two where C was Mandarin and Russian (which was horrendous for collaboration...), so I think the AppStream spec shouldn't blindly encode C == en_US. |
|
Thanks for your thoughts @ximion! I’ll try and put together a draft merge request for this (and my other recent issues) in September, once I have a bit of headspace from the GNOME release. |
This allows specifying the locale of the source translatable strings in a component. The vast majority of the time, this is `en_US`, but that’s not guaranteed. Add a `source-locale` attribute to allow changing this default. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: ximion#345
|
I’ve put some proposed spec changes together at #351 for discussion. I don’t think they should be merged until libappstream and appstream-compose have been changed to support the new functionality, but I didn’t want to work on that until the spec changes are largely agreed. |
This allows specifying the locale of the source translatable strings in a component. The vast majority of the time, this is `en_US`, but that’s not guaranteed. Add a `source_locale` attribute to allow changing this default. The attribute has been added to the `<translation/>` element so that it can be used by the metadata generator to synthesize a `<lang/>` element for the source locale. It’s not been added to the `<languages>` element, as it’s assumed that element is auto-generated and hence can include the source locale explicitly as a `<lang/>` element. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: ximion#345
This reflects the new `source_locale` attribute added to the specification. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: ximion#345
Support parsing the new `<translation source_locale=""/>` attribute, and turn it into a fake `<lang/>` entry at 100% for the source locale. Add tests. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Fixes: ximion#345
This reflects the new `source_locale` attribute added to the specification. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: ximion#345
Support parsing the new `<translation source_locale=""/>` attribute, and turn it into a fake `<lang/>` entry at 100% for the source locale. Add tests. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Fixes: ximion#345
This allows specifying the locale of the source translatable strings in a component. The vast majority of the time, this is `en_US`, but that’s not guaranteed. Add a `source_locale` attribute to allow changing this default. The attribute has been added to the `<translation/>` element so that it can be used by the metadata generator to synthesize a `<lang/>` element for the source locale. It’s not been added to the `<languages>` element, as it’s assumed that element is auto-generated and hence can include the source locale explicitly as a `<lang/>` element. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #345
This reflects the new `source_locale` attribute added to the specification. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #345
Almost all applications (which use gettext, at least) are written with their C (untranslated) locale in
en_US. This means that they never have an expliciten_UStranslation, but are always 100% translated toen_US.Should the
<languages>element listen_USexplicitly, in which case it should probably be injected by the appstream XML generator?Or should the spec say that the application’s C locale is never listed as a
<lang>element, and should be assumed to been_US?If we go with the second option, perhaps the assumption about the C locale being
en_UScould be overrideable (in the few cases where an application is written in something other than US English by default) by setting an attribute like<languages default-language="es_ES">and defining that language as 100% translated.I can put together a merge request to update the specification either way, but need to know what approach would be preferable🙂
The text was updated successfully, but these errors were encountered: