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

Using grains['locale_info']['defaultlanguage'] as a locale #350

Closed
moebiuseye opened this issue Mar 25, 2016 · 2 comments
Closed

Using grains['locale_info']['defaultlanguage'] as a locale #350

moebiuseye opened this issue Mar 25, 2016 · 2 comments

Comments

@moebiuseye
Copy link
Contributor

I'm thinking this is probably a good idea for package
that were translated in a very large number of languages, especialy GUI applications.

(I have to say I'm very frustrated that the only available
option is to install things in american english)

For packages that do not provide all translations,
I may systematicaly try something like this, for every sls file:

# Using defaultlanguage only for available translations
{% if grains['locale_info']['defaultlanguage'] in ['en_US', 'es_ES', 'fr_FR', 'de_DE', 'etc.'] %}
{% set locale = grains['locale_info']['defaultlanguage'] %}
{% else %}
{% set locale = "en_US" %}
{% endif %}

And then using that locale variable for the installer:

    - locale: {{locale}}

Please tell me if something is preventing us from doing this.
If we can do this, I'll make a pull request for the following sls files:

  • libreoffice
  • openoffice
  • firefox
  • gimp
  • chrome

I will be testing and validating this with Windows Server 2008 RC2 and Windows Seven Pro.

Please tell me if you know of other software that you think can be safely added to this list.

Thank you.

@moebiuseye
Copy link
Contributor Author

I've tested this with libreoffice in fr_FR for now, and it's working quite well.

TheBigBear added a commit that referenced this issue May 25, 2016
TheBigBear added a commit that referenced this issue May 25, 2016
Merge pull request #350 from TheBigBear/TheBigBear-upd-eea
@twangboy
Copy link
Collaborator

Locale is ignored by winrepo. This feature would need to be added to salt itself.

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

No branches or pull requests

2 participants