Forum › Forums › General › Tips and Tricks › Internationalisation of antiX community scripts
- This topic has 56 replies, 7 voices, and was last updated Mar 8-3:48 pm by Anonymous.
-
AuthorPosts
-
January 30, 2021 at 9:39 am #51140Forum Admin
anticapitalista
::Where are the files for all the other 5-characters-long locales hiding?

Since there are no translations in those languages, there is no point in including them.
Philosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - leaner and meaner.
January 30, 2021 at 8:43 pm #51195MemberRobin
::@skidoo
Hopefully this screenshot will illustrate WHY i ask that question.
Yes and no. “No”, because — as I pointed out already — all any language present in the folder /usr/share/locale are utilised, irrespective of the length of its ID.
And “Yes”, because I was not aware there are more folders containing localisations, as your attachments imply. @anticapitalista: May these folders contain .mo files also? Are there possibly more directories to be considered? My state of knowledge was, all language files on a system are to be found in subfolder LC_MESSAGES under a particular language in /usr/share/locale only. Please let me know if I am mistaken, so I could correct this in the script.Where are the files for all the other 5-characters-long locales hiding?
See attatchment. What the script offers as language choice, corresponds directly to the content of this folder. You can’t get blood from a stone. We can only edit a file which is present in system. Well, this is half the truth only, since I’m just about to create a way to enable our translators to make tests in their native language even if it is not present in the folder structure still, so they can request to add their language in transifex after having successfully completed their translation and the tests. Once in transifex, it will show up soon in the folder structure also. Again, without respect to the length of its identifier.
Btw, the script is not armed still. The lines 353, 354 containing the command for copying files back to system are commented out, until testing is sufficiently done.
Attachments:
Windows is like a submarine. Open a window and serious problems will start.
February 1, 2021 at 7:08 pm #51289Anonymous
::Yes and no.
Perhaps I should have started a separate topic. My inquiry is really generic, is not specific to the script being discussed in this topic.
all language files on a system are to be found in subfolder LC_MESSAGES under a particular language in /usr/share/locale only. Please let me know if I am mistaken, so I could correct this in the script.
You and I are learned together here. The commonground is that we cannot “support” translation efforts unless we first understand the mechanics and conventions involved. Scroll back and review my earlier screenshot. Note the path where those files reside. Their presence in that path belies the notion “in
/usr/share/locale only”.observations:
sudo updatedb && locate .po|grep -v [.]po[a-z]
^–> none of the .po files reside under /usr/share/localels /usr/share/locale/en/LC_MESSAGES
^–> contains *.mo files onlySince there are no translations in those languages, there is no point in including them.
wondering:
In the absence of a fr_BE file, does the software fallback and load “generic” fr ?
vs
In the absence of an exact match, falls back to using “C” (or whichever default)disclaimer:
asking here because I’m not confident that websearching would provide a definitive answer, specific to the antiX implementation.February 1, 2021 at 7:29 pm #51291Forum Admin
anticapitalista
::If user has chosen fr_BE at F2 live boot menu, IceWM, fluxbox, JWM menus are in French (fr).
Any antiX apps should also be in French (assuming there is a French translation).Apps that come from Debian (the vast majority) should be internationalized to fr_BE (if its translated .mo file exists, but I don’t see any apps that have a fr_BE .mo file present in /usr/share/locale/fr_BE) otherwise French is used.
Philosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - leaner and meaner.
February 5, 2021 at 6:44 pm #53904MemberRobin
::If user has chosen fr_BE at F2 live boot menu, IceWM, fluxbox, JWM menus are in French (fr).
Any antiX apps should also be in French (assuming there is a French translation).Apps that come from Debian (the vast majority) should be internationalized to fr_BE (if its translated .mo file exists, but I don’t see any apps that have a fr_BE .mo file present in /usr/share/locale/fr_BE) otherwise French is used.
Thank you very much, anticapitalista, for your clarification.
This is exactly the way of functioning I had expected, and it seems to me this was the only reasonable way to do it. To this conclusion I had already come while writing the first approach this thread starts with, but could not determine for sure whether it works always this way, since I didn’t find the mechanism behind the scenes where all this logic is hidden. Never mind, It’ll work, also for the new approach.Here comes an update to Ver. 0.29 of the test suite.
Along to the translation to some foreign languages I did some bugfixing, the most important of them were:- fixed the way program determines whether if user has closed the test window to go on. (was unreliable, it was enough to open another terminal window to scramble the cycle) - fixed behaviour when multiple instances of the program get started simultaneously. Had to prevent them from sharing the same working directory.So now you can edit the script’s own language files using itself for this task.
Again, it’s been tested on 17.4.1, needs testing on 19.x series.Be aware, this time the script is armed. So when clicking “yes” in the last dialog (after testing was done already), the modified .mo file will be copied back to system. So the textstring you might have corrected will be immediately in use on your system, not only in the testing environment.
Script is localised this time to English, French, German, Brasilian Portuguese, and Russian language. Please be lenient towards my translations, I’m not a native speaker except for German… If you are native speaker, you are welcome to improve the translation files of this script, you might upload the corrected language files to this thread, please.
And finally: this time the script comes with a tiny installer, so unexperienced users with good knowledge of their language will be able to use it. If you don’t like to use the installer script you can also simply copy the files found inside manually to all their places in your system as needed, which shouldn’t be a problem at all for experienced users.
Instructions:
1.) download attached aCMSTS.tar.gz file and extract it to a folder of your choice.
2.) open a terminal window (from antiX menu)
3.) ‘cd’ to the folder the extracted files are located in, you will find a file called “installer.sh”
4.) type ‘/bin/bash installer.sh’ in the terminal window. You’ll become asked to enter sudoer password after script has started, since files have to be integrated in system structure. Please look carefully for the output in terminal window while installer is working. In the end you should hopefully get the message:Installation has completed successfully. You will find ˮantiX Community Multilanguage Support Test Suite (aCMSTS)ˮ in main menue --> programs --> development.5.) Open the file Readme_Lisez-moi_Liesmich_Leia-me_Прочитайте.txt in an editor (e.g. leafpad) in order to get some more information.
6.) Start aCMSTS from antiX menu, submenu “programs”, section “development”.Please let me know if you encounter any problems using the script or the installer.
Robin
- This reply was modified 2 years, 3 months ago by Robin.
Attachments:
Windows is like a submarine. Open a window and serious problems will start.
February 19, 2021 at 2:39 pm #54589Member
marcelocripe
::Hello anticapitalista,
I have tested the @Robin program a few times and have already reported details about what worked and what didn’t. According to the help text, your program will be of great use, once we can test how the translation will be displayed in the programs and thus be able to adjust the line breaks in the best possible way. (Thank you very much Robin)
I noticed some interesting situations, the “.po” files are possible to edit and the “.mo” files are not. With aCMSTS-029.tar.gz I could see that there are several translations available for pt_BR (unplugdrive, antix-wifi-switch, spacefm and etc.), they have texts from one of the versions of the transifex website and even then antiX displays the texts of several English language programs. I think this could be a problem. Is there any way to make antiX display the available texts /us/share/locale/pt_BR?
Grateful.
marcelocripe
(Original text in Brazilian Portuguese)———-
Olá anticapitalista,
Eu testei algumas vezes o programa do @Robin e já reportei a ele os detalhes sobre o que funcionou e sobre o que não funcionou. Conforme o texto de ajuda, o seu programa será de grande utilidade, uma vez poderemos testar como a tradução será exibida nos programas e assim poder ajustar as quebras de linhas da melhor forma possível. (Muito obrigado Robin)
Eu observei algumas situações interessantes, os arquivos “.po” são possíveis editar e os arquivos “.mo” não. Com o aCMSTS-029.tar.gz eu pude ver que existem vários traduções disponíveis para pt_BR (unplugdrive, antix-wifi-switch, spacefm e etc), possuem textos de uma das versões do site transifex e mesmo assim o antiX exibe os textos de vários programas em idioma Inglês. Eu acho que isso possa ser um problema. Existe alguma forma de fazer o antiX exibir os textos disponíveis /usr/share/locale/pt_BR?
Grato.
marcelocripe
(Texto original em Português do Brasil)February 19, 2021 at 10:49 pm #54612MemberRobin
::Hello Marcelo,
I can confirm this behaviour in antiX 17.4.1, at least for the unplugdrive.sh. (I didn’t check any other programs for now). This script was always presented to me in English language on a completely German localised antiX. I didn’t pay any attention to that, since I am used to the fact that some programs don’t have translations still. But you are right: there is a .mo files present for this program, and it should be actually in use. But it wouldn’t be used. What I’ve checked already:
— whether mo file has correct naming.
— whether script itself contains everything necessary to invoke usage of .po files.
— whether mo file is decompilable (using my multilanguage test suite script), and gets recompiled after editing.
— whether the $ marked textstrings in unplugdrive.sh match the expressions in the decompilation from the original .mo file
Everything looked fine, no errors found, but neither the original nor the recompiled one from poedit (which was decompiled using my multilanguage test suite before) wouldn’t work.Then I have tested other languages also, non of the unplugdrive.sh.mo files from /usr/share/locale would be used when switching to the language in question temporarily. Always english language, as builtin in this script.
Downloaded most recent German version of unplugdrive.sh.po from transifex, compiled it with poedit to .mo file and copied it to system folder. Even this file version wouldn’t work.
So I decided to create a new .pot file from scratch (thank you very mutch for your great hints, @Xecure!) and creating a new .po file for german language in poedit. After copying this completely new .po file back to system folder ‘/usr/share/locale/de/LC_MESSAGES’ manually the translation was accepted by system immediately.
I don’t have found out what is wrong with the files delivered originally with antiX, but they must be corrupted in some way.
Two things I didn’t check:
— The order of strings in the file differs from the order they are used in script. This shouldn’t be a problem, really, but who knows for sure?
– The second, looks to me more likely: the encoding of the original files may be not supported by actual antiX any more. It looks as if it wasn’t utf-8, but I wasn’t able to trace this down.As a referece I’ll attatch the .pot file I have created, along with the functioning German .mo file and the original malfunctional German .mo file from antiX 17.4.1
Maybe somebody finds out what needs to be corrected in the files on transifex so the programs will get their translations.
While creating another language file (pt_BR) of unplugdrive maybe I found a trace. The original strings seem to be ASCII encoded instead of utf-8 indeed (see screenshot). @anticapitalista: maybe you might figure out who in the antiX development team could fix this in the .pot files in use on transifex directly, instead of creating new language files in every and each user system individually, for all programs affected.
Robin
P.S.:
There will come soon a new version of the “antiX Comunity Multilanguage Test Suite”. I have got some feedback (Many thanks, Marcelo!, that my last version (0.29) wouldn’t work on antiX 19.x series correctly, which will be hopefully fixed then (I dont’t have a running 19.x by now), along with some minor bugfixing and some improved functionality.- This reply was modified 2 years, 2 months ago by Robin.
- This reply was modified 2 years, 2 months ago by Robin.
Attachments:
Windows is like a submarine. Open a window and serious problems will start.
February 20, 2021 at 1:17 am #54623Member
marcelocripe
::Hi Robin,
Thanks for sending me the translated “unplugdrive.sh.mo” file.
I cut the original file to another folder, as a security measure. Then I pasted the file “unplugdrive.sh.mo” that you created in the folder “/usr/share/locale/pt_BR/LC_MESSAGES”. It worked immediately.
Now the following doubts remain:
Will the file I added in the folder “/usr/share/locale/pt_BR/LC_MESSAGES” be overwritten in the next antiX update by another file in English?
In other tests that I did, I translated manually, directly in the script of “unplugdrive.sh”, similar to what you had remade with “unplugdrive-intl.sh” (it was excellent!). Both in the file only pt_BR, and with the file of the international version created by you, after an antiX update, the translated file was overwritten by the file in English.
The replacement also occurred with the files: set_time-and_date.sh, yad-calendar (with the agenda created by PPC) and icewm_toolbar_icon_manager.sh (updated version of PPC).
If the update were always looking for the most recent texts on the transifex website, this would be very good, as the program and the translated texts would be updated. But what happens after the updates is antiX 19.2 full back to having several programs in English only.
marcelocripe
(Original text in Brazilian Portuguese)———-
Olá Robin,
Obrigado por me enviar o arquivo “unplugdrive.sh.mo” traduzido.
Eu recortei o arquivo original para uma outra pasta, como medida de segurança. Depois colei o arquivo “unplugdrive.sh.mo” que você criou na pasta “/usr/share/locale/pt_BR/LC_MESSAGES”. Funcionou imediatamente.
Agora restam as seguintes dúvidas:
O arquivo que eu adicionei na pasta “/usr/share/locale/pt_BR/LC_MESSAGES” será sobrescrito na próxima atualização do antiX por outro arquivo em idioma Inglês?
Em outros testes que eu fiz, traduzi manualmente, direto no script do “unplugdrive.sh”, semelhante ao que você havia refeito com o “unplugdrive-intl.sh” (ficou excelente!). Tanto no arquivo apenas pt_BR, quanto com o arquivo da versão internacional criado por você, após uma atualização do antiX, o arquivo traduzido foi sobrescrito pelo arquivo em idioma Inglês.
A substituição ocorreu também com os arquivos: set_time-and_date.sh, yad-calendar (com a agenda criado pelo PPC) e icewm_toolbar_icon_manager.sh (versão atualizada do PPC).
Se a atualização buscasse sempre os textos mais recentes do site transifex, isso seria muito bom, pois seriam atualizados o programa e os textos traduzidos. Mas o que acontece após as atualizações é o antiX 19.2 full voltar a ficar com vários programas apenas em idioma Inglês.
marcelocripe
(Texto original em Português do Brasil)March 5, 2021 at 7:01 pm #55406Member
marcelocripe
::Hello Robin,
Will the file I added in the folder “/usr/share/locale/pt_BR/LC_MESSAGES” be overwritten in the next antiX update by another file in English?
The answer to my question came in the update that occurred last week, the “unplugdrive” program was shown again in English.
anticapitalista wrote:
About translations and antiX (I’m not interested in the translated MX apps).
transifex is where we want all our native apps to be translated so translators will have to use that platform.Otherwise it would be a nightmare trying to coordinate across git/transifex/personal emails etc.I asked the MX Linux forum to unblock areas that are blocked from transifex website, the richb administrator’s response was this:
The current system has worked well for us and we see no compelling reason to change it, thanks.
Apparently, what is working well, but with the wrong texts, will continue to be wrong. Even though I asked MX Linux administrators to read this topic, in order to become aware that the actions carried out in the transifex interfere in both distributions. Unfortunately they did not want to discuss the matter and still blocked the topic. Even insisting on a private message, the conversation does not evolve. Who knows if other people request the unblocking of the blocked areas, MX Linux administrators can pay attention to the subjects covered in this topic.
As long as antiX administrators do not talk to MX Linux administrators, I believe that the transifex areas in different languages will remain blocked, preventing others from making the necessary corrections.
I asked the reviewers zeh and hugok to keep the pt-BR area unlocked, me and other colleagues are working on the constant improvement of the translations of antiX and MX Linux for the Brazilian Portuguese language.
marcelocripe
(Original text in Brazilian Portuguese)———-
Robin,
O arquivo que eu adicionei na pasta “/usr/share/locale/pt_BR/LC_MESSAGES” será sobrescrito na próxima atualização do antiX por outro arquivo em idioma Inglês?
A resposta da minha pergunta veio na atualização que ocorreu na semana passada, o programa “unplugdrive” voltou a ser exibido em idioma inglês.
anticapitalista wrote:
About translations and antiX (I’m not interested in the translated MX apps).
transifex is where we want all our native apps to be translated so translators will have to use that platform.Otherwise it would be a nightmare trying to coordinate across git/transifex/personal emails etc.Eu pedi no fórum do MX Linux que fosse feito o desbloqueio das áreas que estão bloqueadas do site transifex, a resposta do administrador richb foi esta:
Tradução do tradutor da internet:
O sistema atual tem funcionado bem para nós e não vemos nenhuma razão convincente para alterá-lo, obrigado.Ao que parece, o que está funcionando bem, mas com os textos errados, irão continuar errados. Mesmo eu pedindo para os administradores do MX Linux lerem este tópico, afim de tomarem ciência de que as ações feitas no transifex interferem em ambas as distribuições. Infelizmente não quiseram discutir sobre o assunto e ainda bloquearam o tópico. Mesmo insistindo com mensagem particular, a conversa não evolui. Quem sabe se outras pessoas solicitarem o desbloqueio das áreas bloqueadas, os administradores do MX Linux possam prestar atenção nos assuntos tratados neste tópico.
Enquanto os administradores do antiX não conversarem com os administradores do MX Linux, eu acredito que as áreas do transifex em diversos idiomas permanecerão bloqueadas, impedindo que outras pessoas façam as correções necessárias.Eu pedi aos revisores zeh e o hugok para manterem a área pt-BR desbloqueada, eu e outros colegas estamos trabalhando na melhoria constante das traduções do antiX e do MX Linux para idioma Português do Brasil.
marcelocripe
(Texto original em idioma Português do Brasil)March 5, 2021 at 11:25 pm #55413Anonymous
::Will the file I added in the folder “/usr/share/locale/pt_BR/LC_MESSAGES” be overwritten in the next antiX update by another file in English?
The answer to my question came in the update that occurred last week, the “unplugdrive” program was shown again in English.
a sysadmin can employ the dpkg-divert command to protect any modified file from being disturbed (overwritten, deleted) by future package update operations. Because the manpage and syntax of the command are unintuitive, let’s walkthrough an example of “how to”.
I’ll use the unremarkable shell script /usr/local/bin/ansi-bars as an example “file to be protected”.
After I have “personalized” the file
sudo echo -e "\n#coelhinho\n" | tee -a /usr/local/bin/ansi-bars ### and, if you care to inspect/verify the modification cat /usr/local/bin/ansi-barsI create a “holding pen” subdirectory (aka “divert to” destination)…
sudo mkdir /usr/local/bin/gatinha
…and add a local dpkg-divert rule
sudo dpkg-divert --no-rename --local --divert /usr/local/bin/gatinha/ansi-bars --add /usr/local/bin/ansi-bars.
In the future (or right now) I can verify that my rule is activedpkg-divert --list *bars or dpkg-divert --listGenerally, I don’t need to know/care WHICH package provided (installed) a file I am protecting.
For this example, I did “look it up” so that I can continue drafting the steps in this walkthough demonstration:$ dpkg -S /usr/local/bin/ansi-bars ^--v local diversion from: /usr/local/bin/ansi-bars local diversion to: /usr/local/bin/gatinha/ansi-bars desktop-defaults-base-antix: /usr/local/bin/ansi-barsOkay, armed with the knowledge that “desktop-defaults-base-antix” is the provider of this now-protected file, let’s test the effectiveness of the newly added dpkg-divert rule:
sudo apt install desktop-defaults-base-antix --reinstallImmediately after the forced reinstall operation, we can note that, yes, the “protected” file remains undisturbed and that the new copy of the file has been installed to the specified “holding pen” subdirectory.
ls /usr/local/bin/gatinha cat /usr/local/bin/ansi-barsMarch 8, 2021 at 2:33 pm #55479Member
marcelocripe
::Hi Skidoo,
I am grateful for explaining how to prevent changes from occurring in the corrected translation files.
I apologize, but I didn’t understand how to do all this setup. Unfortunately, I still have great difficulties in understanding some translations from the internet translators and more complex command sequences.
Did you write the words “coelhinho” and “gatinha” in Portuguese?
I wish that we can, with the help of the program that Robin has been developing (I’m late in testing the program, excuse me Robin), create ways to make corrections and updates to translations permanent, not just for a local antiX, but for all users scattered on this giant planet. Because when I write about translations or adaptations of translated texts from antiX, I’m not thinking exclusively about myself, I think about all the people who look at the texts and cannot understand what is written, or because it is not in their language or for being badly written.
Anyway, I am thankful that you (skidoo) tried to teach me. I am learning little by little, due to the reduced time that I have in front of antiX.
Thank you very much.
marcelocripe
(Original text in Brazilian Portuguese)———-
Olá Skidoo,
Eu agradeço por explicar como impedir que as alterações ocorram nos arquivos de tradução corrigidos.
Eu peço desculpas, mas eu não entendi como fazer toda esta configuração. Infelizmente eu ainda tenho grandes dificuldades para entender algumas traduções dos tradutores da internet e sequências de comandos mais complexos.
Você escreveu as palavras “coelhinho” e “gatinha” em idioma português?
Eu desejo que possamos, com a ajuda do programa que o Robin vem desenvolvendo (estou atrasado nos testes do programa, desculpe-me Robin), criarmos meios para tornar as correções e atualizações das traduções permanentes, não apenas para um antiX local, mas para todos os usuários espalhados neste planeta gigante. Pois quando eu escrevo sobre traduções ou adaptações dos textos traduzidos do antiX, eu não estou pensando exclusivamente em mim, eu penso em todas as pessoas que olham para os textos e não conseguem compreender o que está escrito, ou por não estar em seu idioma ou por estar mal redigido.
De qualquer maneira, eu agradeço por você (skidoo) ter tentado me ensinar. Eu estou aprendendo aos poucos, devido ao tempo reduzido que eu tenho em frente do antiX.
Muito obrigado.
marcelocripe
(Texto original em idioma Português do Brasil)March 8, 2021 at 3:48 pm #55482Anonymous
::Did you write the words “coelhinho” and “gatinha” in Portuguese?
Yes, hoping to make the example less boring. Words for “bunny” and “kitty”, according to GoogleTranslate.
-
AuthorPosts
- You must be logged in to reply to this topic.

