OpenWrt Forum Archive

Topic: OpenWRT other language than English? 2 bugs..?

The content of this topic has been archived on 20 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello,

this post refers to CC release, where I tried to install Slovak language via package management,

1. There is a mistake in Slovak language packages for Luci apps
http://i60.tinypic.com/2hhmwyf.png
- country code sk refers to Slovak language. Slovak in Slovak lang is Slovenčina - that's correct, however there's Slovene in the bracket - which is incorrect. Slovak is correct. This correction applies also on other luci-i18n-*-sk packages.

2. Enabling my custom language?
http://i60.tinypic.com/oiu8h1.png
the option to choose Slovak language is missing. OR I am missing something.

I have installed luci-i18n-base-sk and also some more luci-i18n-*-sk packages.

Is there something I am missing?
Thanks! smile

This one will be short.

What milestone?
http://i62.tinypic.com/289wpjm.png

What version trunk/cc?
http://i60.tinypic.com/maifyo.jpg

This forum sounds like a lot of talking, totally! smile

I'd verify it's a openwrt/luci issue and not the specific language pack issue (by installing a different language and trying to select that other one) first and if it's the former I'd assign it to trunk/tunk.

@stangri: thxfor suggestion, I tried different language, it worked. So this is language specific, Slovak trans is broken, it seems.
I was looking for sources, but didnt find it either on

https://github.com/openwrt/luci
https://github.com/openwrt/packages
git://git.openwrt.org/openwrt.git

am I blind? where are luci-i18n-*-sk pckgs sources located? Would like to dig in it a bit...
Thanks to anyone who points me to the right direction smile)

https://github.com/openwrt/luci/blob/master/luci.mk defines all language names.


Ps. I found the right file by using the github search to look for "Slovene" in Luci repository

EDIT:
the two language names are rather close:
SK / Slovenčina / Slovak
SL / Slovenščina / Slovene

(Last edited by hnyman on 13 Oct 2015, 08:11)

And you are right, even after installing the luci-i18n-base-sk, the language does not get shown in Luci's language list. (I tried with French, Italian, Swedish and Norwegian and they all are shown in the list.)

But the error is apparently coming from deeper than the Luci GUI, as the language file has not been installed into the file system at all, although it is in list of the installed languages:

root@OpenWrt:/# cat /etc/config/luci
...
config internal 'languages'
        option sv 'Svenska (Swedish)'
        option fr 'Français (French)'
        option it 'Italiano (Italian)'
        option sk 'Slovenčina (Slovene)'
        option uk 'украї́нська (Ukrainian)'
        option no 'Norsk (Norwegian)'
...

root@OpenWrt:/# ls /usr/lib/lua/luci/i18n
base.fr.lmo  base.it.lmo  base.no.lmo  base.sv.lmo  base.uk.lmo

(Last edited by hnyman on 13 Oct 2015, 09:30)

Well, there is no actual error, just empty data leading into a bit confusing situation:

Nobody has ever translated any of the Luci base terms to Slovak. The translation contains no content, just the initialisation (Luci terms in English).
https://github.com/openwrt/luci/blob/ma … sk/base.po

The Luci translation file generation system (po2pmo) does not generate the file if there is no content.
As the file is not generated, it is naturally not copied to the router, and then Luci does not show the language on the language list.

https://github.com/openwrt/luci/blob/ma … lmo.c#L199
https://github.com/openwrt/luci/blob/ma … lmo.c#L233

I tested manually and translated one term, re-built and copied into the router. Then Slovak was shown in the list.

(Last edited by hnyman on 13 Oct 2015, 09:38)

The discussion might have continued from here.