po and mo
Moderator: Forum Moderators
- hermestrismi
- Posts: 634
- Joined: February 6th, 2016, 11:28 pm
- Location: Tunisia
- Contact:
po and mo
what is the difference between .mo files and .po?
and where can I get .po?
(https://www.wesnoth.org/gettext/?view=l ... er&lang=ar had only links and not clear .po files)
and where can I get .po?
(https://www.wesnoth.org/gettext/?view=l ... er&lang=ar had only links and not clear .po files)
The Dark Master, The Dark Hordes (Unofficial version), Return of the Legion , Eternal Kingdom, An Elvish Scout,Unrest in Elfland , Hidden War ...
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
- hermestrismi
- Posts: 634
- Joined: February 6th, 2016, 11:28 pm
- Location: Tunisia
- Contact:
Re: po and mo
I downloaded the pages as saved page and changed extension from .txt to .po
is it that?
is it that?
The Dark Master, The Dark Hordes (Unofficial version), Return of the Legion , Eternal Kingdom, An Elvish Scout,Unrest in Elfland , Hidden War ...
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
- Atreides
- Posts: 1094
- Joined: March 30th, 2019, 10:38 pm
- Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off
Re: po and mo
I think there is also a way to turn .mo into .po. It was some Linux program. I did something like that a while back but I can't recall the details anymore.
Re: po and mo
yeah it's
msgunfmt
which is part of the gettext
suite of tools: https://www.gnu.org/software/gettext/ma ... InvocationWesnoth-related GitHub repos:
General mods collection, SotBEEE, AToTBWaTD, The Earth's Gut, A Little Adventure, FtF
Social media: Mastodon: @egallager@treehouse.systems, Steam: egallager
General mods collection, SotBEEE, AToTBWaTD, The Earth's Gut, A Little Adventure, FtF
Social media: Mastodon: @egallager@treehouse.systems, Steam: egallager
Re: po and mo
The original .po files have comments, using
Welcome to the translators. I'd recommend only translating the 1.16 branch, the place to get .po files from is the 1.16 ("branch") version of that page: https://www.wesnoth.org/gettext/?view=l ... ch&lang=ar
There are some bugs in handling of right-to-left languages, for example #5600. That can be fixed on the 1.16 branch (it can be fixed because it doesn't break interoperability), and if we have an active Arabic translator then that bug will treated as higher priority.
msgunfmt
to convert a .mo back to a .po will result in something that doesn't have comments.Welcome to the translators. I'd recommend only translating the 1.16 branch, the place to get .po files from is the 1.16 ("branch") version of that page: https://www.wesnoth.org/gettext/?view=l ... ch&lang=ar
There are some bugs in handling of right-to-left languages, for example #5600. That can be fixed on the 1.16 branch (it can be fixed because it doesn't break interoperability), and if we have an active Arabic translator then that bug will treated as higher priority.
- hermestrismi
- Posts: 634
- Joined: February 6th, 2016, 11:28 pm
- Location: Tunisia
- Contact:
Re: po and mo
Hi. I already started but it will take time since there is almost 100% to translate and arabic language is really hard enough so no promises but I will do what I canoctalot wrote: ↑May 2nd, 2022, 5:33 am The original .po files have comments, usingmsgunfmt
to convert a .mo back to a .po will result in something that doesn't have comments.
Welcome to the translators. I'd recommend only translating the 1.16 branch, the place to get .po files from is the 1.16 ("branch") version of that page: https://www.wesnoth.org/gettext/?view=l ... ch&lang=ar
There are some bugs in handling of right-to-left languages, for example #5600. That can be fixed on the 1.16 branch (it can be fixed because it doesn't break interoperability), and if we have an active Arabic translator then that bug will treated as higher priority.
The Dark Master, The Dark Hordes (Unofficial version), Return of the Legion , Eternal Kingdom, An Elvish Scout,Unrest in Elfland , Hidden War ...
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
- hermestrismi
- Posts: 634
- Joined: February 6th, 2016, 11:28 pm
- Location: Tunisia
- Contact:
Re: po and mo
hi
when you translate, do you keep the variable names
like from 'Loaded referenced map file:
$new' to
'ملف الخريطة المشار إليه الذي تم تحميله:
$new'
or you translate them as well?
when you translate, do you keep the variable names
like from 'Loaded referenced map file:
$new' to
'ملف الخريطة المشار إليه الذي تم تحميله:
$new'
or you translate them as well?
The Dark Master, The Dark Hordes (Unofficial version), Return of the Legion , Eternal Kingdom, An Elvish Scout,Unrest in Elfland , Hidden War ...
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
Re: po and mo
Keep them - when the string is displayed, the engine will replace
The engine won't complain if you omit the variable entirely. For strings such as
$new
with the actual filename. It needs the original variable name, otherwise it won't know what to replace.The engine won't complain if you omit the variable entirely. For strings such as
"Should $name pick up the sword?"
, some languages need to know the gender of the unit, and so their translators rephrased it in a way that didn't include the unit at all.- hermestrismi
- Posts: 634
- Joined: February 6th, 2016, 11:28 pm
- Location: Tunisia
- Contact:
Re: po and mo
I am asking because while I can easly know viariables by the $ sign, I don't know if sentences like '-name:' are variables or not.
sorry, but again , I send the finished file to who? I didn't found a proper thread and no arabic translator is available
sorry, but again , I send the finished file to who? I didn't found a proper thread and no arabic translator is available
The Dark Master, The Dark Hordes (Unofficial version), Return of the Legion , Eternal Kingdom, An Elvish Scout,Unrest in Elfland , Hidden War ...
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
Re: po and mo
Please quote the exact string that you're asking about. It doesn't sound like a variable, but it sounds odd too.
As you're the only arabic translator, you're the translation maintainer and should send your files directly to Ivanovic, WesnothTranslationsHowTo#How_to_submit_your_translations. He collects the files and uploads all the ones he received each Saturday afternoon; he'll also run merge tools if the .po file isn't based on the latest version of the .pot file.
As you're the only arabic translator, you're the translation maintainer and should send your files directly to Ivanovic, WesnothTranslationsHowTo#How_to_submit_your_translations. He collects the files and uploads all the ones he received each Saturday afternoon; he'll also run merge tools if the .po file isn't based on the latest version of the .pot file.
- hermestrismi
- Posts: 634
- Joined: February 6th, 2016, 11:28 pm
- Location: Tunisia
- Contact:
Re: po and mo
yes, it is from https://www.wesnoth.org/gettext/.octalot wrote: ↑June 15th, 2022, 8:47 am Please quote the exact string that you're asking about. It doesn't sound like a variable, but it sounds odd too.
As you're the only arabic translator, you're the translation maintainer and should send your files directly to Ivanovic, WesnothTranslationsHowTo#How_to_submit_your_translations. He collects the files and uploads all the ones he received each Saturday afternoon; he'll also run merge tools if the .po file isn't based on the latest version of the .pot file.
I found things like
Code: Select all
name:
Code: Select all
type:
also, if I translate a sentence, do that automatically translate the same word at all .po files when open them (i use PoEdiit)
The Dark Master, The Dark Hordes (Unofficial version), Return of the Legion , Eternal Kingdom, An Elvish Scout,Unrest in Elfland , Hidden War ...
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
Re: po and mo
Code: Select all
Name:
Type:
It doesn't, but PoEdit has a list of suggestions that are populated from previous translations. So after you translate it once, that will appear as a suggestion in the top-right pane of PoEdit when editing other files.hermestrismi wrote: ↑June 15th, 2022, 9:59 am also, if I translate a sentence, do that automatically translate the same word at all .po files when open them (i use PoEdiit)
- hermestrismi
- Posts: 634
- Joined: February 6th, 2016, 11:28 pm
- Location: Tunisia
- Contact:
Re: po and mo
right. i see now.octalot wrote: ↑June 15th, 2022, 10:56 amIf we were adding those now, we'd probably make them more specific and add translation hints. They're displayed as-is to the user, so should be translated, but get reused for filenames, unit descriptions, and the tooltips that can appear when hovering over units in the scenario editor.Code: Select all
Name: Type:
It doesn't, but PoEdit has a list of suggestions that are populated from previous translations. So after you translate it once, that will appear as a suggestion in the top-right pane of PoEdit when editing other files.hermestrismi wrote: ↑June 15th, 2022, 9:59 am also, if I translate a sentence, do that automatically translate the same word at all .po files when open them (i use PoEdiit)
thank you
another question
how can I test my .po?
(and why all files have the same name when download them (ar.po)? I change them for exemple to wesnoth-editor_ar.po but certainly this not the name the engine comprehend)
The Dark Master, The Dark Hordes (Unofficial version), Return of the Legion , Eternal Kingdom, An Elvish Scout,Unrest in Elfland , Hidden War ...
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
Re: po and mo
They all have the same name because the Gettext system uses the directory that they're in to decide which domain they correspond to, and the filename to decide which language they are. Edit: for .mo files, it's the other way round; it'll behermestrismi wrote: ↑June 15th, 2022, 11:32 am how can I test my .po?
(and why all files have the same name when download them (ar.po)? I change them for exemple to wesnoth-editor_ar.po but certainly this not the name the engine comprehend)
translations/ar/LC_MESSAGES/wesnoth-editor.mo
.Three methods, any of which should work:
- GettextForTranslators#Files_when_running_the_game Generate .mo files (there's an option in PoEdit to do that when saving) and replace the game's .mo file with the new one.
- Replace the .po files in a full copy of the Wesnoth source, then use the build-tools to generate .mo files.
- https://r.wesnoth.org/p672739 Delete the .mo files, put the new .po files in a place where the engine will find them (which isn't where they are in the full source).
- hermestrismi
- Posts: 634
- Joined: February 6th, 2016, 11:28 pm
- Location: Tunisia
- Contact:
Re: po and mo
my badoctalot wrote: ↑June 15th, 2022, 11:46 amThey all have the same name because the Gettext system uses the directory that they're in to decide which domain they correspond to, and the filename to decide which language they are.hermestrismi wrote: ↑June 15th, 2022, 11:32 am how can I test my .po?
(and why all files have the same name when download them (ar.po)? I change them for exemple to wesnoth-editor_ar.po but certainly this not the name the engine comprehend)
Three methods, any of which should work:
- Generate .mo files (there's an option in PoEdit to do that when saving) and replace the game's .mo file with the new one.
- Replace the .po files in a full copy of the Wesnoth source, then use the build-tools to generate .mo files.
- https://r.wesnoth.org/p672739 Delete the .mo files, put the new .po files in a place where the engine will find them (which isn't where they are in the full source).
I should read carefully .
Thank you very much for all those information and assistance
The Dark Master, The Dark Hordes (Unofficial version), Return of the Legion , Eternal Kingdom, An Elvish Scout,Unrest in Elfland , Hidden War ...
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin