In his blog/news of Jan 13, 2023 BK has made an appeal for contributing to translation of initrd files.
He has already machine translated the french ones which gave amazing results.
But looking at a few translations, like "to spawn a shell" by "frayer", a verb that means in french what the adult salmons do to make baby salmons,
Here's the first file checked and corrected init.str.fr :
checking french initrd-tree files
Moderator: BarryK
checking french initrd-tree files
- BologneChe
- Posts: 510
- Joined: Sun Aug 23, 2020 12:29 am
- Location: Stoneham, Québec
- Has thanked: 318 times
- Been thanked: 140 times
Re: checking french initrd-tree files
bluefrog wrote: Sat Jan 14, 2023 12:58 amIn his blog/news of Jan 13, 2023 BK has made an appeal for contributing to translation of initrd files.
He has already machine translated the french ones which gave amazing results.
But looking at a few translations, like "to spawn a shell" by "frayer", a verb that means in french what the adult salmons do to make baby salmons,
Here's the first file checked and corrected init.str.fr :
chk.init.str.fr.zip
Effectively. And some anglicisms have slipped into the whole.
Born to lose; live to win
Re: checking french initrd-tree files
bluefrog,
Thanks very much for correcting the file.
Google translate is very clever, but I didn't think it would get everything right.
I will upload the corrected file to github soon.
Re: checking french initrd-tree files
For anyone else reading this thread, bluefrog is responding to my blog post here:
Re: checking french initrd-tree files
Sorry to forgot to put the link to the BK blog/news of Jan 13.
Note: He has since added a small addendum on Jan 14.
Checked and corrected the following other french initrd str.fr files at:
https://github.com/bkauler/woofq/tree/m ... d-tree/nls
I didn't touch the fixlayers.str.fr file, which amount to only 2 lines:
Code: Select all
S001='Correction des couches SFS modifiées'
S002='Numérisation :'
The original english content being:
Code: Select all
[url]S001='Fixing changed SFS layers'
S002='Scanning:'[/url]
I don't know what exactly is fixed/corrected in S001, and
I doubt 'Numérisation' is the right translation for 'Scanning' in the context of S002.
May be 'balayage', but of what ?
Calling BologneChe ? (or another fellow having also a knowledge of programming)
bf
Re: checking french initrd-tree files
Here my final corrected french version of the initrd-tree files.
Made some small wording improvements.
Note:
1) The original init.str.en has a missing <'> at the beginning of line s026
as was the original init.str.fr, now corrected in the present version.
2) I assumed that <\'> is the correct escape way to put one into the middle of a line
like: 'Recherche d\'un fichier externe:' ('Searching for external file:')
(the machine french translation sometimes doubled it <''> that I all changed to <\'>)
3) Without additional precision, I translated line 2 of fixlayers.str:
English: .................................................S002='Scanning:'
machine french: ......................................S002='Numérisation:'
proposition in chk2.fixlayers.str.fr :..........S002='Balayage (scanning):'
because 'numérisation' means 'digitisation', what a scanner ultimately does
even if 'scanning' (the usual word) being only the mechanical/optical first part
(and is why the app used it for translation ).
But, if 'scanning' here means looking for files, then use:
S002='Recherche de fichiers:'
and if it means looking for drives, then use:
S002='Recherche de lecteurs:'
To BK: If something need to be changed (like the escape character) on the files
or for any other french translation/checking need just signify it in a post on https://bkhome.org/news/tag_easy.html.
bf
Re: checking french initrd-tree files
Thanks for your feedback. Before reading your post, this morning I made lots of fixes:
https://github.com/bkauler/woofq/tree/m ... d-tree/nls
The line in fixlayers with S002="Scanning:":
Code: Select all
echo " ${S002} /mnt/${WKG_DEV}/${WKG_DIR}.session"
...that is scanning a folder, looking for certain files.
Re: checking french initrd-tree files
Well... never say final .
Here my chk3-fr files, truly verified this time, against the last BK modification to the english ones.
with apologies to having let pass so many un-escaped single quote <'> on precedent version.
I would have get a C- once put in use and yet only for the effort
Please signal any other hicups.
bf
Re: checking french initrd-tree files
Hi,
Check the link:
https://github.com/bkauler/woofq/tree/m ... d-tree/nls
All variables are now in double-quotes, so the single-quotes no longer need to be escaped.
Instead, any double-quotes within a string need to be escaped.
I made the swap because some languages use the single-quote character frequently.
Thanks for your help.
Re: checking french initrd-tree files
Yes. I'm pleased to announce that the chk3-fr can be confidently downloaded and used.
I modified all the 5 files yesterday night (Canada/Eastern time) after you posted the change 'Last commit 21f1a8c' and informed this forum subject.
It's because of all the lines now in double quote that I used the search and replace function to do the same on the french translations
and saw to my dismay, how many, of the single quotes, that I have initially missed.
What I did was to let them intact and remove the escape character in front of the ones I catch in my precedent versions.
I, naturally, followed your english examples and put the french version of your escaped double quoted terms also in escaped double quote.
Please enjoy the beach. Here, it's a white blanket and we will receive another 10 inches (25cm) tomorrow.
fb
Re: checking french initrd-tree files
I just made a discovery!!!
I prefer to have a string in single-quotes, as bash/ash just treats the string as-is, without any interpretations.
The only problem is escaping single-quotes within the string.
I thought that it has to be done like this:
Code: Select all
S100='this is a string with a single quote '\'' char inside'
...that's awkward, you have to have a single-quote to end the string, then an escaped single-quote, then another single-quote to start the rest of the string.
However, reading this, there is another way:
https://www.baeldung.com/linux/single-q ... ted-string
Testing:
Code: Select all
# S100=$'this is a string with a single quote \' char inside'
# echo "$S100"
this is a string with a single quote ' char inside
# ash
# S100=$'this is a string with a single quote \' char inside'
# echo "$S100"
this is a string with a single quote ' char inside
...I ran ash to check that it also works with busybox ash. It does.
This dollar character in front is a trick I didn't know about.
I'm thinking, will write a little script that converts all the *.str.* files.
Probably do that tonight and upload to github.
Re: checking french initrd-tree files
Before making that change, need to check how google translate will behave with variables defined in this format:
Code: Select all
S100=$'this is a string'
S101=$'this is a string with embedded \' character'
S102='normal strings do not need the $ prefix character'
S103='Double quotes in a string do "not" need to be escaped'
S104=$'Ok let\'s put in single-quote and "double quote" characters in same string'
S105='This is a string with $VAR1 in it'
S106=$'Mix of lots, single-quote \', double-quote ", dollar $VAR, and ${VAR1} characters'
pasted that into translate.google.com, translated to french:
Code: Select all
S100=$'ceci est une chaîne'
S101=$'ceci est une chaîne avec le caractère \' intégré'
S102='les chaînes normales n'ont pas besoin du caractère de préfixe $'
S103='Les guillemets doubles dans une chaîne n'ont "pas" besoin d'être échappés'
S104=$'Ok, mettons des guillemets simples et des "guillemets doubles" dans la même chaîne'
S105='Ceci est une chaîne contenant $VAR1'
S106=$'Mix of lots, single-quote \', double-quote ", dollar $VAR, and ${VAR1} characters'
...this will need to be edited afterward, single-quote characters need to be escaped and prefixed with a $ character -- in S102, S103
Re: checking french initrd-tree files
Just to be sure this is going to work, I created a file 'strs':
Code: Select all
S100=$'this is a string'
S101=$'this is a string with embedded \' character'
S102='normal strings do not need the $ prefix character'
S103='Double quotes in a string do "not" need to be escaped'
S104=$'Ok let\'s put in single-quote and "double quote" characters in same string'
S105='This is a string with $VAR1 in it'
S106=$'Mix of lots, single-quote \', double-quote ", dollar $VAR, and ${VAR1} characters'
Then a script 'strs.sh':
Code: Select all
#!/bin/ash
. ./strs
echo "${S100}"
echo "${S101}"
echo "${S102}"
echo "${S103}"
echo "${S104}"
echo "${S105}"
echo "${S106}"
Then ran it:
Code: Select all
# ./strs.sh
this is a string
this is a string with embedded ' character
normal strings do not need the $ prefix character
Double quotes in a string do "not" need to be escaped
Ok let's put in single-quote and "double quote" characters in same string
This is a string with $VAR1 in it
Mix of lots, single-quote ', double-quote ", dollar $VAR, and ${VAR1} characters
...yes, correct result.
Note, I have avoided embedding variables in the strings, too awkward to handle. I just put in that S106 string as an example, an embedded variable will not get substituted.
Re: checking french initrd-tree files
Very good, found that the $'text string' format was supported in bash 2.04, then extended in bash 4.4 to handle all the C escape sequences:
https://en.wikipedia.org/wiki/Escape_se ... _sequences
Tested in the busybox ash script:
Code: Select all
S107=$'Ok let\'s put in single-quote and "double quote" characters and new-line \n in same string'
The script prints it:
Code: Select all
Ok let's put in single-quote and "double quote" characters and new-line
in same string
...good!
But then, have to ask, the $'text' format does processing of the line, no longer printing it as-is. Perhaps just keep the "text" format. Hmmm, need to think about this tonight.
Re: checking french initrd-tree files
My apologies for making changes, I think this is it, finally:
https://bkhome.org/news/202301/escaping ... nitrd.html
Strings have single-quotes at each end. There is no longer a need to escape the single-quote character, nor the double-quote character.
Latest files:
Re: checking french initrd-tree files
I assume that the actual, Jan 25, french version of initrd files on github has been made with the chk2 version because of the usage of single quotes in this version. However, I mention that the chk3 version included also wording improvements with the transformation of all strings from single to double quotes
In case of interest to adopt them, here the chk4 version made with the files as available since Jan 25 on github (single quote string with no escape character) and including the improvements of chk3 version:
I made the following changes (plus a few minor ones not included below - taking more time than I thought to report them):
Code: Select all
e -> last english version Jan25 on github
f -> last french " " " "
4 -> proposition in chk4 files
1) chk4.find-file.str.fr
-> no changes
2) chk4.fscheck.str.fr
-> no changes
3) chk4.rollback.str.fr
-> no changes
4 ) chk4.fixlayers.str.fr
Code: Select all
e S002='Scanning:'
f S002='Numérisation :'
p S002='Recherche de fichiers:'
(already explained)
5) chk4.init.str.fr
Code: Select all
e S015='Please enter the number corresponding to your keyboard layout.'
f S015='Veuillez saisir le chiffre correspondant à la disposition de votre clavier.'
4 S015='Veuillez saisir le nombre correspondant à la disposition de votre clavier.'
(I initialy translated 'number' by 'chiffre' (digit) instead of 'nombre' )
(would have been ok for choice between 0 and 9)
e S016='Choose the closest match, there will be an opportunity to fine-tune the layout
after the desktop has loaded. Press ENTER only for US.'
f S016='Choisissez la correspondance la plus proche, vous aurez la possibilité d'affiner
la mise en page après le chargement du bureau.
Appuyez sur <Enter> uniquement pour choisir les États-Unis.'
4 S016='Choisissez la correspondance la plus proche, vous aurez la possibilité d'affiner
la mise en page après le chargement du bureau.
Appuyez sur <Enter> uniquement pour choisir le clavier US (États-Unis).'
(a bit more explicit: when choosing US its the keyboard (clavier) which is chosen)
e S017='Note: on some PCs the keyboard does not work at this stage of bootup.
In that case, wait 5 minutes for bootup.'
f S017='Note: sur certains PC, le clavier ne fonctionne pas à ce stade du démarrage.
Dans ce cas, attendez 5 minutes pour le démarrage.'
4 S017='Note: sur certains PC, le clavier ne fonctionne pas à ce stade du démarrage.
Dans ce cas, attendez 5 minutes pour la finalisation du démarrage.'
(less clear in french to wait for the completion of the bootup, so added 'finalisation')
e S103='Exited from init script early, nothing yet mounted.'
f S103='Sortie anticipée du script d\'initialisation, rien n\'est encore monté.'
4 S103='Sortie anticipée du script d'initialisation, rien n'est encore monté.'
-> ERROR here: two escape characters escape the change :-)
e S115='Working drive read speed test (lower the better):'
f S115='Test de vitesse de lecture du lecteur de travail (plus bas est meilleur):'
4 S115='Test de vitesse de lecture du lecteur de travail (une faible note indique un bon résultat):'
(initial translation: 'plus bas est meilleur' is really ugly french)
(didn't find an expression as compact as the english one)
e S120='Resizing working-partition to fill drive'
f S120='Redimensionner la partition de travail pour remplir le lecteur'
4 S120='Redimensionnement de la partition de travail pour remplir le lecteur'
(Redimensionner: to resize, redimensionnement more in line with resizing)
e S121='ERROR: unable to resize working-partition'
f 121='ERREUR: redimensionnement impossible de la partition de travail'
4 S121='ERREUR: échec du redimensionnement de la partition de travail'
4 S123 same mod
4 S124 " "
4 S125 " "
... other similar changes
e S195='extra squashfs file does not exist, removed from load-list.'
f S195='Le fichier squashfs supplémentaire n\'existe pas, supprimé de la liste de chargement.'
4 S195='Le fichier squashfs supplémentaire n'existe pas, supprimé de la liste de chargement.'
-> ERROR: escape character
Please note, in case of choosing to keep the actual (Jan 25) version, that S103 and S195 have escape characters.
On a final note (which with programming is never true ), please congratulates your daughter for her excellent logo's idea.
(I didn't post my appreciation in the thread "Thinking about the logo", to not clog the expression of ideas and meaningful responses)
The 'ez' on 'os' is graphically appealing but the her idea of a dog wearing sunglasses is 'meaningfully' appealing.
It both gets the spirit of the goal of the os and respect the traditional theme of your line of os.
fb
Re: checking french initrd-tree files
Escaped characters are no longer required, see the README file: