You are not logged in.

#1 2021-03-14 21:49:54

ghorvath
Member
Registered: 2015-10-01
Posts: 154

Localization support for bl packages?

Hi Team,

Thanks for all the efforts you put into bl. It is still a remarkable configuration of debian. I was going to go full xfce due to some multiple monitor usage issues, but just recently took a look at bl-lithium, and I'm hooked all over again. Anyway, let's get to my question at hand.

Are there any plans to have localization support to the bunsenlabs packages? And also if people indeed localize their machines, then make those localizations available in the official bl repositories?

I'm mostly thinking about the default conky, the menu and the bl-exit script, but I'm sure a lot of other stuff could also be localized. But even packages like bunsen-meta-all could have a localized version, which would pull in the appropriate localized packages as dependencies.

Background: I manage a couple machines used by elder people, who don't speak English, only Hungarian. Thus I needed to go into the config files of these (and for bl-exit, actually needed to modify the script itself) to make them available in Hungarian. Now, this is a pain to do at every new release of bl, because I always need to understand the structure of these files all over again, and in many cases it is not obvious what has changed and how. However, with localization support, a translator would only need to check one file containing only the text they need to translate. It would also make it much clearer if some new text needs to be translated at a package update.

Offline

#2 2021-03-14 22:01:58

hhh
Meep!
Registered: 2015-09-17
Posts: 12,032
Website

Re: Localization support for bl packages?

^ Well, if you want to tackle localization, even just for Hungarian, it's not like we're gonna say no.

Offline

#3 2021-03-15 07:47:37

ghorvath
Member
Registered: 2015-10-01
Posts: 154

Re: Localization support for bl packages?

hhh wrote:

^ Well, if you want to tackle localization, even just for Hungarian, it's not like we're gonna say no.

Maybe I wasn't entirely clear. I don't mind doing a Hungarian translation. My question is rather: is there a plan to support translations in such a way that a translator only needs to add one file which only contains the translation itself? And no coding is involved.
I'm thinking of the way how e.g. gettext would handle this. Is this planned to be implemented, or is this something I would need to also develop myself?

Offline

#4 2021-03-16 00:46:12

hhh
Meep!
Registered: 2015-09-17
Posts: 12,032
Website

Re: Localization support for bl packages?

I'll have to let @JohnRaff help you, this is out of my scope of knowledge.

Offline

#5 2021-03-16 02:39:59

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,168
Website

Re: Localization support for bl packages?

--- summoned by an at-mention ---

(Actually not something the forum software supports, at least not yet - I got here by osmosis.)

Anyway, @ghorvath the subject of internationalization has come up in the past, and I think people agree some translations might be a Good Thing, but preparing packages to accept translated strings would involve a lot of initial work (not to mention studying up roll) even if the job of translating them is then left to the community. The BL developer team is very small, and on top of that, as you've found already, packages tend to change with each upgrade...

But all is not lost.

@malm has already created a framework to accept translated strings for jgmenu, and it might not take too much more work to have that up and running. We will need input from him to confirm that, however.

Yes, the default conky sounds like a good candidate because the number of strings is small, and doesn't change so much from release to release.

bl-exit is another good one because we're talking about a few words only: "Logout", "Power Off" etc.

A certain amount of basic preparation for translated strings in bl-welcome was done long ago by a previous contributor, but still the list of strings to translate needs to be made, and of course changes every time the script itself changes. So this improvement might still be further down the road.

As for bunsen-meta-all, could you give some specific examples of packages that should be replaced to provide the kind of localization you mean? Things like Firefox i18n packages? Maybe we could better offer separate addon packages like eg bunsen-meta-hungarian for things like that?

Finally, we are begging the question of whether a small desktop like BL should be, or can afford to be, providing i18n support. Technically, I think a certain amount is possible (that was @hhh's invocation I guess?) but whether there is a consensus in the team that an effort needs to be made here or not still needs to be discovered.

Anyway, thanks for raising this important topic!


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#6 2021-03-16 12:50:02

DeepDayze
Like sands through an hourglass...
From: In Linux Land
Registered: 2017-05-28
Posts: 1,278

Re: Localization support for bl packages?

to me, offering a BL "language pack" via something like bl-meta-<language> might be a good route. Installing such a package will add the language to the install and should be possible to install more than one language and also to have a means of switching languages.


Real Men Use Linux

Offline

#7 2021-03-17 00:53:40

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,168
Website

Re: Localization support for bl packages?

^But how could an external language pack alter the messages in eg bl-exit? All the language packs I know of are aimed at specific programs like firefox or LibreOffice.
Although, RedHat seem to have such a concept: https://access.redhat.com/documentation … m-settings

I don't know anything much about gettext but it does seem as if the kind of language support where a program looks at a user's environment variables and chooses the right strings to use is something that's done with compiled C programs using GTK or Qt - the "big" ones like Thunar etc. Right now, I don't know how that would be done with simple shell scripts like ours. https://stackoverflow.com/questions/117 … -c-program

Anyway, if anyone felt like putting together a proof of concept and posting it up somewhere, or as a Pull Request on one of our GitHub packages, it would be most appreciated and likely smooth the way to implementation.

---
PS There is something here, inherited from #!
https://github.com/BunsenLabs/bunsen-we … anslations
But note here:
http://mywiki.wooledge.org/BashFAQ/098
it says "There is a potential security hole in this bash feature. Its use is discouraged", so hmm...
https://www.gnu.org/software/gettext/ma … /bash.html

This too:
https://www.linuxjournal.com/content/in … sh-scripts

Last edited by johnraff (2021-03-17 01:21:58)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#8 2021-03-17 02:35:05

tknomanzr
BL Die Hard
From: Around the Bend
Registered: 2015-09-29
Posts: 1,057

Re: Localization support for bl packages?

^ We used a master strings table in my last big project. Then we would have somebody translate it because you don't want to use Google translate if you need it to look professional. Then I would copy the strings back into the master strings table. In reality, it probably should have been database table(s) but it was just a huge flat file. It basically defined strings for every UI element in the project, along with their various translations that were all defined by their unicode definition (i.e. en-us). It was really awkward for that size of project but probably wouldn't be too bad for what we do. Its just a lot of code reorganization.

Last edited by tknomanzr (2021-03-17 02:35:38)

Offline

#9 2021-03-27 22:37:55

ghorvath
Member
Registered: 2015-10-01
Posts: 154

Re: Localization support for bl packages?

Ok, apparently jgmenu supports internationalization pretty easily, according to its tutorial. I'll create a Hungarian version of the menu items, figure out where to put it and how to start it, and afterwards I'll try to make a pull request on the bl repo.

After the first example, it shouldn't be hard to continue in the same manner.

Offline

Board footer

Powered by FluxBB