Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Loading translation files into /usr/local/emhttp/languages

Featured Replies

I've been working on adding localization to the Tailscale plugin, but ran across a weird behavior with Community Apps / language pack installation and would like to understand how to make this work best.

 

Per the multi-language design guide, "The translation text file(s) which comes with a plugin needs to be manually stored in the corresponding language sub-directory." I know that some plugins have their translations included in the Unraid language pack itself, but I would prefer to keep translations in my repository.

 

Based on the the design guide, I tried adding /usr/local/emhttp/languages/es_ES/tailscale.txt to my package. This works fine for loading the translations, but has a problematic side effect: it causes CA to believe that the entire language pack is installed (presumably CA is detecting the presence of the es_ES folder instead of the file in /boot/config/plugins). As a result, the language pack cannot be completely installed if a user wants to do to after installing the plugin.

 

Are language packs guaranteed to install before plugins? If so, I could rely on detecting the presence of the language folders and only load my translation if it already exists. This creates a small sequencing bug (if someone installed the language pack after the plugin, the plugin translations wouldn't be loaded until after the next reboot), but that might be something I could live with.

 

Alternately, I have a cron job that I could have "monitor" for language folders and copy the translations in, but that's a very ugly solution to the problem that I'd prefer not to use.

 

Or is there another solution that I'm missing?

Yes CA thinks that it's installed due to the folder existing

 

What you should be doing is submitting the base english files here: https://github.com/unraid/lang-en_US

 

And then you can also include the Spanish translations here https://github.com/unraid/lang-es_ES

 

That way the base translations will propagate to all the languages for someone to (hopefully) translate, and your Spanish ones will be there on the next update of the languages

  • Author

Ultimately, my goal was to keep the localization files inside the repositories for the plugin; I have existing tools / workflows for localization projects which I'd like to keep using :).

 

Now I know that my original approach won't work as cleanly as I would have liked it to, but I have a plan B that will work nicely for me.

 

Thanks for the info!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.