Skip to content
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

Incomplete mapping of language names in control panel #824

Closed
agitator opened this issue Aug 13, 2015 · 9 comments · Fixed by plone/plone.i18n#44
Closed

Incomplete mapping of language names in control panel #824

agitator opened this issue Aug 13, 2015 · 9 comments · Fixed by plone/plone.i18n#44

Comments

@agitator
Copy link
Member

screen shot 2015-08-13 at 09 31 08

for example de-at maps to "Deutsch (Österreich)", de-ch is not mapped to a label
where does the "magic" happen here?

@agitator agitator added this to the Plone 5 milestone Aug 13, 2015
@pbauer pbauer modified the milestones: Plone 5.0.x, Plone 5.0 Sep 19, 2015
@jensens
Copy link
Sponsor Member

jensens commented Jun 20, 2019

still an issue

@davisagli
Copy link
Sponsor Member

Still valid in Plone 6

@davisagli davisagli modified the milestones: Plone 5.0.x, Plone 6.0 Aug 24, 2022
@mauritsvanrees
Copy link
Sponsor Member

plone/i18n/locales/languages.py has the language definitions. de-ch is missing a native name for the language:

    "de-at": {
        "name": "German (Austria)",
        "native": "Deutsch (Österreich)",
        "flag": "countryflag/at",
    },
    "de-ch": {
        "name": "German (Switzerland)",
        "flag": "countryflag/ch",
    },

So to fix it, you edit de-ch to have "native": "Deutsch (Gruezibuezi)" ;-)

I suppose it is logical that the English name is not used as fallback: if the user does not understand English, then she may not recognise the English name. "German" and "Deutsch" do not even begin with the same character.

I will add a few for German and Dutch.

mauritsvanrees added a commit to plone/plone.i18n that referenced this issue Aug 24, 2022
…iants.

Then all related language variants are shown together in the language control panel.
Fixes plone/Products.CMFPlone#824, at least for these two languages.
@davisagli
Copy link
Sponsor Member

@mauritsvanrees I could imagine a fancy fallback that looks for a translation of the non-country-specific variation name of the language, then adds the 2-char country code in parentheses. But it is probably easier to just add the native names manually.

mister-roboto pushed a commit to plone/buildout.coredev that referenced this issue Aug 25, 2022
Branch: refs/heads/master
Date: 2022-08-25T01:13:47+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.i18n@d447fc2

Added native names for German and Dutch country-specific language variants.

Then all related language variants are shown together in the language control panel.
Fixes plone/Products.CMFPlone#824, at least for these two languages.

Files changed:
A news/824.bugfix
M plone/i18n/locales/languages.py
Repository: plone.i18n

Branch: refs/heads/master
Date: 2022-08-25T17:31:39+02:00
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at>
Commit: plone/plone.i18n@57cda76

Merge pull request #44 from plone/maurits-native-names-de-nl

Added native names for German and Dutch language variants

Files changed:
A news/824.bugfix
M plone/i18n/locales/languages.py
@davisagli
Copy link
Sponsor Member

Not really complete; that PR only fixed it for German and Dutch

@davisagli davisagli reopened this Aug 25, 2022
@jensens
Copy link
Sponsor Member

jensens commented Aug 25, 2022

wtf, automatic close ...

@davisagli
Copy link
Sponsor Member

@jensens yeah I know, no worries

@erral
Copy link
Sponsor Member

erral commented Aug 26, 2022

the AvailableContentLanguageVocabulary in plone.app.vocabularies uses the native name and if there is no native language name, the language code to build the vocabulary.

In our language list in plone.i18n we have native names only for language names and not for language-country variants (except some of them).

I added a PR fixing this in plone.i18n for many languages (mainly the big ones like fr, es and en), but there are still some missing, like ar 😵

@mauritsvanrees
Copy link
Sponsor Member

Thanks @erral! I think this can be closed now. Doing so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants