Page 3 of 8

Posted: Tue 27 Jan 2015, 15:59
by xanad
Wow! This is just a nice tip ..., damn did not know it ... :lol:

Code: Select all

for f in `ls  *.mo`; do  msgunfmt $f  -o ${f//mo/po}; done

Posted: Tue 27 Jan 2015, 17:04
by xanad
After unfmt, three files return this answer:

Code: Select all

msgunfmt: file "acpi.mo" is not in GNU .mo format
msgunfmt: file "net-setup.mo" is not in GNU .mo format
msgunfmt: file "refresh-menus.mo" is not in GNU .mo format
The others files are right.

If I use java -p

Code: Select all

read-mo.c:240: message catalog has context dependent translations, but the output format does not support them.
read-mo.c:240: message catalog has plural form translations, but the output format does not support them. Try generating a Java class using "msgfmt --java", instead of a properties file.

Re: msgfmt

Posted: Wed 28 Jan 2015, 12:04
by xanad
L18L wrote:
xanad wrote:...how to convert many files po2mo in one shot. Someone can suggest a way?
not convert but format:

Code: Select all

for f in `ls  *.po`; do  msgfmt $f  -o ${f//po/mo}; done
try it because not tested.
ok it works, but also replaces all the characters 'po' with 'mo'.... and vice versa.
ex .: 'osmo' becomes 'ospo' and 'momanger' becomes 'pomanager' :shock:

:arrow: Solution: adds the dots before the extensions
mo2po

Code: Select all

for f in `ls  *.mo`; do  msgunfmt $f  -o ${f//.mo/.po}; done
po2mo

Code: Select all

for f in `ls  *.po`; do  msgfmt $f  -o ${f//.po/.mo}; done

Posted: Fri 30 Jan 2015, 07:40
by xanad
Further changes to strengthen the code (from an italian user):

mo2po:

Code: Select all

for f in *.mo; do msgunfmt "$f" -o "${f%.mo}.po"; done
po2mo:

Code: Select all

for f in *.po; do msgfmt "$f" -o "${f%.po).mo"; done


First very, very simple example for a gtk-gui:
mo2po
Image
-Create a folder with the files .mo to be converted to .po
-Place inside the folder the file mo2po
-Click ok button
-If launched directly from geany, you will also have the reports of possible errors creating .mo files.

Posted: Sat 31 Jan 2015, 17:45
by don570
I've finished puppy units 2.1
- added more languages - now Italian , French ,Spanish , German

____________________________________________________

I used Google translation service

Tips ----> remove \n and add lots of punctuation. Space out the
sentences line by line. Then save the Google translation page
to a HTML file to be opened up later.

________________________________________

Posted: Sun 01 Feb 2015, 07:28
by xanad
don570 wrote: I used Google translation service
Warning, do not rely on automatic translations, very often they are wrong. They should always be checked by a native speaker.

Example:

from

Code: Select all

msgid "22) The volume of a pyramid:"
msgstr "22) Volume di un pyramido:"
to

Code: Select all

msgid "22) The volume of a pyramid:"
msgstr "22) Volume di una piramide:"

Posted: Tue 03 Feb 2015, 08:45
by xanad
New file again... edit export
acpi_poweroff.sh

Posted: Wed 04 Feb 2015, 00:33
by don570
msgstr "22) Volume di una piramide:"
Don't blame Google :lol: Blame me.

I was working at home without
internet access, so I just guessed a word :oops:

I'll change it in a few days.

___________________________________________________

Posted: Sun 08 Feb 2015, 17:19
by Argolance
Bonsoir,
robwoj44 wrote:I gettextized psip32.
1. Download the source from https://chiselapp.com/user/jamesbond/re ... dir?ci=tip
The link goes to a page that gives the list of the source files, but how to download the whole directory?
Silly question: Why keeping the file named "demo.mo" instead of doing things to get something like "psip.mo"? Isn't it a bit confusing?

Thanks

Cordialement.

Posted: Sun 08 Feb 2015, 21:20
by robwoj44
The link goes to a page that gives the list of the source files, but how to download the whole directory?
Silly question: Why keeping the file named "demo.mo" instead of doing things to get something like "psip.mo"? Isn't it a bit confusing?
I do not know how to download the whole directory, but it is not necessary.
You can use standard psip which is in puppy. Download psip.pot from http://www.murga-linux.com/puppy/viewto ... h&id=83189. Translate, make demo.mo because the orginal psip looks for demo.mo as translated file.
I'm agree that it is confusing, but in the orginal source code there is 'textdomain ("demo")'. Of course you can download and recompile psip with 'textdomain ("psip")'.

Posted: Mon 09 Feb 2015, 10:09
by Argolance
Thank you a lot, mate! :wink:

Cordialement.

Posted: Sun 01 Mar 2015, 19:25
by robwoj44
I wanted to add the support of gettext to e3. It is the program in asm (assembler). I could not find any example how to do it. Maybe anybody knows?

e3

Posted: Tue 03 Mar 2015, 14:08
by L18L
robwoj44 wrote:I wanted to add the support of gettext to e3. It is the program in asm (assembler). I could not find any example how to do it. Maybe anybody knows?
First of all I could not find e3.
http://en.wikipedia.org/wiki/E3
Another link would be helpful.

Posted: Tue 03 Mar 2015, 14:18
by robwoj44

e3

Posted: Tue 03 Mar 2015, 16:26
by L18L
robwoj44 wrote:I mean editor e3
https://sites.google.com/site/e3editor/
OK, got it.

Version 2.8
Source files: e3.h and e3.asm.
Right?

I have an idea how to proceed. You know how to compile?

EDIT
There is no gettext for asm.

I have generated a sed-translation file.

Code: Select all

# translate like: s#"English"#"your translation"#
  
s#"MicroEditor e3 v2.8"#"MicroEditor e3 v2.8"#
s#"Y"#"Y"#
s#"-UTF8"#"-UTF8"#
s#"(C)"#"(C)"#
s#"2000-10 A.Kleine"#"2000-10 A.Kleine"#
s#"Enter filename or leave with RETURN"#"Dateiname eingeben oder beenden mit RETURN"#
.
.
.

Posted: Sat 07 Mar 2015, 19:58
by don570
I did a gettext version of zathura_gui
It is good for opening large PDF files.

http://murga-linux.com/puppy/viewtopic.php?t=70032
_______________________________________________-

Posted: Sat 07 Mar 2015, 22:33
by musher0
xanad wrote:Hi Don,
:idea: is an interesting way, above all for long files, but we must
remember to check the translation because google sometimes translates in
his own way, not the right one.
Hello, xanad.

I'll second you, with this correction :) :
google ALWAYS translates in its own way !
For French<>English translation at least -- and perhaps from all latin
languages
to English and vice versa, I find that reverso offers more
accurate translations than Google.

A general resource, lexicool provides a list of online translation sites for
perhaps all the languages in the world.

This is important:
If you use automatic translation sites and you need to validate the
translation of a particular word or expression, the multilingual site
wordreference is accessible to anyone and easy to use. Most of all,
it's reliable, since it's based on input from professional translators
and from people who speak the target language
.

You should never try to translate a text into a language that you're not
fluent in -- unless you want your reader to perceive you as a clown.

If you want to become a translator and you need to practice your skills,
that's fine, but always have your translations, especially automatic
translations, checked by a professional translator or at the very least by a
native speaker.

I hear you asking: "Why?"

Well, the perennial problem with automatic translations, even simple ones,
is -- has always been and always will be -- that no computer-language
algorithm will ever be able to innately understand the context and situation
in which a word or expression is used. Only we humans are able to perceive
those differences and decode their true meaning for our situation.

It's like intonation, but amplified a hundred times. Depending on the
intonation, the simple sentence: "There will be snow tomorrow." can be:

* a joke to your friends, if you're in the middle of summer on a frying-hot
day, with a cold beer in your hand;

* a tease, if the person you're talking to didn't believe there would be snow
tomorrow, and the weatherman on TV just said a polar vortex is coming
down from Hudson's Bay.

* a mild warning, from a mother who wants her child to keep warm on her
school outing.

* a severe warning to his sailors from the the captain of a Coast Guard
vessel, with an order to be on high alert, because a serious winter storm
is heading towards the Bay at 60 knots per hour, and not all fishermen are
at port yet.

* etc., etc.

One simple sentence, and we have how many meanings? Indeed, correctly
translating a text is like decoding the tone of voice, but a hundred times
more difficult and with a hundred times more possibilities of expression.

Finally, if I ever meet don570 in the streets of Ottawa (Ottawa is across
the river from my city), I'll have a very serious chat with him about why
he wishes to put professional translators out of a job and generally
promote mediocre translations. Heck, I have thirty years of experience
in translation and I still call a colleague for revisions regularly.

Don, what have we translators ever done to you to deserve this? Viewing
the issue from the receiving end: our Puppyists and our applications
deserve better than automatic translations, don't you think?

Sorry for having taken so much of your time, but I felt some t's needed to
be barred concerning accuracy in human communication. BFN.

musher0

Posted: Sun 08 Mar 2015, 09:15
by xanad
I have thirty years of experience
in translation and I still call a colleague for revisions regularly.
:D Of course musher0, also for us.
now we are reviewing all the texts also taking all accents and apostrophes ,as in French.
http://www.italianpuppy.org/community/i ... 44#msg7244
http://www.italianpuppy.org/community/i ... 67#msg7167
We refer to the rules of good translation of ubuntu.
http://tp.linux.it/buona_traduzione.html
Google and other online services are very inefficient and can ONLY help in case of huge files but MUST be absolutely verified by native translators. Why are fluent translations and not as a clown ... :roll:
I agree with you, puppy deserves more attention. :wink:

Posted: Tue 10 Mar 2015, 00:17
by don570
Zathura_gui was rewritten to gettext from Zigbert's method
It allows the opening of big PDF files.

http://murga-linux.com/puppy/viewtopic.php?t=70032
_____________________________________________________

Posted: Wed 25 Mar 2015, 22:22
by robwoj44
Pctorrent and Pcreatetorrent gettexted