New files 'gettextized' for everyone 2015

For efforts in internationalising Puppy and solving problems in this area
Message
Author
User avatar
xanad
Posts: 400
Joined: Fri 28 Feb 2014, 14:56
Location: 2 locations: MonteRosa Alp and Milano
Contact:

#41 Post 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
[url]http://www.xanad.tk[/url] Html5 Parallax

User avatar
xanad
Posts: 400
Joined: Fri 28 Feb 2014, 14:56
Location: 2 locations: MonteRosa Alp and Milano
Contact:

#42 Post 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.
[url]http://www.xanad.tk[/url] Html5 Parallax

User avatar
xanad
Posts: 400
Joined: Fri 28 Feb 2014, 14:56
Location: 2 locations: MonteRosa Alp and Milano
Contact:

Re: msgfmt

#43 Post 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
[url]http://www.xanad.tk[/url] Html5 Parallax

User avatar
xanad
Posts: 400
Joined: Fri 28 Feb 2014, 14:56
Location: 2 locations: MonteRosa Alp and Milano
Contact:

#44 Post 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.
Attachments
mo2po.tar.gz
(415 Bytes) Downloaded 613 times
[url]http://www.xanad.tk[/url] Html5 Parallax

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#45 Post 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.

________________________________________

User avatar
xanad
Posts: 400
Joined: Fri 28 Feb 2014, 14:56
Location: 2 locations: MonteRosa Alp and Milano
Contact:

#46 Post 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:"
[url]http://www.xanad.tk[/url] Html5 Parallax

User avatar
xanad
Posts: 400
Joined: Fri 28 Feb 2014, 14:56
Location: 2 locations: MonteRosa Alp and Milano
Contact:

#47 Post by xanad »

New file again... edit export
acpi_poweroff.sh
Attachments
acpi_poweroff.sh.tar.gz
(2.62 KiB) Downloaded 604 times
[url]http://www.xanad.tk[/url] Html5 Parallax

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#48 Post 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.

___________________________________________________

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#49 Post 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.

robwoj44
Posts: 399
Joined: Fri 08 Aug 2008, 18:15
Location: Warsaw

#50 Post 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")'.

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#51 Post by Argolance »

Thank you a lot, mate! :wink:

Cordialement.

robwoj44
Posts: 399
Joined: Fri 08 Aug 2008, 18:15
Location: Warsaw

#52 Post 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?

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

e3

#53 Post 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.

robwoj44
Posts: 399
Joined: Fri 08 Aug 2008, 18:15
Location: Warsaw

#54 Post by robwoj44 »


User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

e3

#55 Post 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"#
.
.
.
Attachments
e3.png
(20.2 KiB) Downloaded 454 times

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#56 Post 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
_______________________________________________-

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#57 Post 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
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
xanad
Posts: 400
Joined: Fri 28 Feb 2014, 14:56
Location: 2 locations: MonteRosa Alp and Milano
Contact:

#58 Post 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:
[url]http://www.xanad.tk[/url] Html5 Parallax

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#59 Post 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
_____________________________________________________

robwoj44
Posts: 399
Joined: Fri 08 Aug 2008, 18:15
Location: Warsaw

#60 Post by robwoj44 »

Pctorrent and Pcreatetorrent gettexted
Attachments
pcreatetorrent.tar.gz
pcreatetorrent gettexted
(2.59 KiB) Downloaded 549 times
pctorrent.tar.gz
pctorrent gettexted
(3.1 KiB) Downloaded 711 times

Post Reply