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

French, German, ... languages for obmenu-generator #18

Closed
ghost opened this issue Oct 15, 2017 · 5 comments
Closed

French, German, ... languages for obmenu-generator #18

ghost opened this issue Oct 15, 2017 · 5 comments

Comments

@ghost
Copy link

ghost commented Oct 15, 2017

Hi,
Can this scenario be accomplished.
We install ArchMerge in French. Xfce shows all menu's in French.
We go to openbox. Only pipemenu places is in French.
Can we have the menu's generated from Obmenu-generator also in French.
If so... how?
This is an example of a French installation.
github

@trizen
Copy link
Owner

trizen commented Oct 15, 2017

Hi. See the example in the config.pl file for name_keys.

@trizen
Copy link
Owner

trizen commented Oct 21, 2017

After thinking a little bit more about this, I think we can do better.

In this commit, I added experimental locale support, which automatically detects what language to use for the name of each entry, based on (LC_ALL LC_MESSAGES LANGUAGE LANG) (more info: here).

This change requires a new dependency: File::DesktopEntry (available as perl-file-desktopentry in the Arch extra repository).

In order to test this new feature, please:

  • Install Linux::DesktopFiles version 0.25
  • Install File::DesktopEntry
  • Execute:
    • git clone https://github.com/trizen/obmenu-generator
    • perl obmenu-generator/obmenu-generator -d -i -s -c

@trizen
Copy link
Owner

trizen commented Dec 25, 2017

Locale support has been added in version 0.82. Closing this now. Feel free to re-open it if something is not working as expected.

@trizen trizen closed this as completed Dec 25, 2017
@luca-vercelli
Copy link

Please, can you explain how this works? I am using version 0.85, however I still see English menus only.

My environment has: LANG=it_IT.UTF-8
No LC_ALL, no LC_MESSAGES, no LANGUAGE

@trizen
Copy link
Owner

trizen commented Oct 25, 2019

See: https://metacpan.org/release/File-DesktopEntry/source/lib/File/DesktopEntry.pm

File::DesktopEntry uses the language data from the .desktop files (/usr/share/applications/*.desktop).

However, not many applications have different names in different languages, therefore the change may not be visible.

Additionally, the name of the categories have to be translated manually in the schema.pl file.

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