Add a danish locale for luci-base
See original GitHub issueI think it would be really easy to add a danish locale to the base, just copy the norwegian base.po
and correct the minor differences.
Would this work, If I just copy it and add the setting like this?
NEW=da
BASE=no
cp -a packages/luci/modules/luci-base/po/$BASE/ packages/luci/modules/luci-base/po/$NEW/
sed -i 's/Language: $BASE/Language: $NEW/g' packages/luci/modules/luci-base/po/$NEW/base.po
And add this line manually in gluon/packages/luci/luci.mk:
LUCI_LANG.da=Dansk (Danish)
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
da_DK - Locale Helper
Locale Helper. Ease creation and maintenance of glibc locale files. Danish - DENMARK (DK) (da_DK). 100% ...
Read more >Adding or Removing Locales by Using nlsadm
You can use the install-locale , list-locale , and uninstall-locale ... For example, to install the Danish locale, you would use the following...
Read more >Build environment not working - General discussion
warning: 4 lines add whitespace errors. ... Applying: luci-base: Add webapps configuration ... Installing package 'danish' from packages
Read more >https://downloads.openwrt.org/releases/19.07.8/pac...
It also automatically adds the required libavahi-client package. ... graph-parallel - iostreams - locale (Requires kernel being compiled with full language ...
Read more >Understanding Locale
Locale Language Country Code Set
Ar_AA Arabic Arabic Countries IBM‑1046
ar_AA Arabic Arabic Countries IS08859‑6
be_BY Byelorussian Belarus ISO8859‑5
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That looks almost ok to me. Just some technical comments and advice:
git rebase -i HEAD~6
etc. so that there is just one commit, before you create the PR. Some advice in CONTRIBUTING.md.I suggest that after editing the .po files, but before committing them, you run from the Luci repo’s root directory the command
./build/i18n-sync.sh
. That will straighten up e.g. the line wraps of multiline strings, as the line lengths may have changed.One additional piece of advice how to add a new language to Luci. It is not really documented anywhere and it is a bit tricky to get “make menuconfig” and/or “make defconfig” to recognise the new language packages, as the language packages are designed to be hidden:
(It is also possible to copy the .po file from a similar language to speed up the translation, as long as you edit the header info to reflect the correct language. e.g, using Norwegian for Danish might work)
And now make menuconfig should find the new language.
I struggled a long time myself before I figured out that last step. As long as there are old tmp/info/.packageinfo-feeds_luci_luci-* files, the new language packages will not show up in menuconfig.