Page 1 of 1

Trying to learn from failures

Posted: Tue 14 May 2013, 12:49
by Bert
Hoping to evoke another open-teaching-moment from the experts..

Pwsget is a perfect example to discuss here, as it is so tiny.

1. I took the gettexted version from the i18n_racy55-130331.pet rodin.s posted last week and replaced the 'old' pwsget in precise puppy with it.

2. Made a .pot file with the voodoo commands we learned from L18L:


Code: Select all

# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-05-14 00:18+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

#: pwsget.sh:20
msgid "Pwget - File downloader utility"
msgstr ""

#: pwsget.sh:23
msgid "Copy and Paste URL location of required file into \"Address\". Add destination and click \"OK\". If the site requires it, you can enter \"Login\" and \"Password\"."
msgstr ""

#: pwsget.sh:26
msgid "Login:"
msgstr ""

#: pwsget.sh:29
msgid "Password:"
msgstr ""

#: pwsget.sh:32
msgid "Address:"
msgstr ""

#: pwsget.sh:36
msgid "Dest Dir:"
msgstr ""

#: pwsget.sh:46
msgid "HELP"
msgstr ""

#: pwsget.sh:46
msgid "Pwget is a simple front end to the wget utility. Wget is used for downloading larger files from the internet such as ISOs. The files are verified during the download procedure. As ISO and other files are checked and downloads resumed, they do not require a md5sum check. Copy and paste the source file you wish to download. Use the file selector to choose the destination. \\n\\n Lobster, Jan 2008"
msgstr ""

#: pwsget.sh:49
msgid "Download"
msgstr ""
3. Made a .po file from the .pot (same voodoo) and translated.

4. Made and added .mo file to LC_MESSAGES.

5. Pwsget still in English.

I did this twice to make certain it was not an accidental error. No juice....

All this was done outside of Momanager.

Any hint would be mmmmost welcome!

PS I checked the .po with

Code: Select all

msgfmt pwsget.po
:
No errors.

PS2. Same problem with HardInfo and a few others.

learn from failures

Posted: Tue 14 May 2013, 14:27
by L18L
Good idea.

I have been trying to reproduce your attempt
but without "vodoo", just command line pasted into this post:
console wrote: # xgettext --language=shell pwsget -o puppy.pot
# msginit
The new message catalog should contain your email address, so that users can
give you feedback about the translations, and so that maintainers can contact
you in case of unexpected technical problems.

Is the following your email address?
root@localhost
Please confirm by pressing Return, or enter your email address.

Retrieving http://translationproject.org/team/index.html... done.
A translation team for your language (de) does not exist yet.
If you want to create a new translation team for de, please visit
http://www.iro.umontreal.ca/contrib/po/HTML/teams.html
http://www.iro.umontreal.ca/contrib/po/ ... aders.html
http://www.iro.umontreal.ca/contrib/po/HTML/index.html

Created de.po.
#
translated some messages in geany
console wrote:# msgfmt de.po -o - > /usr/share7locale/de/LC_MESSAGES/puppy.mo
bash: /usr/share7locale/de/LC_MESSAGES/puppy.mo: Datei oder Verzeichnis nicht gefunden
# msgfmt de.po -o - > /usr/share/locale/de/LC_MESSAGES/puppy.mo
# ./pwsget
sh: /tmp/pm_source_dir: Datei oder Verzeichnis nicht gefunden
sh: /tmp/pm_mirror_dir: Datei oder Verzeichnis nicht gefunden
sh: -c: line 0: unexpected EOF while looking for matching ``'
Translation OK.
1 error when clicking HELP
[edit]vicmz's contribution is running without this error :D [/edit]
console wrote:# wget --help
GNU Wget 1.13.4, ein nicht-interaktives Netz-Werkzeug zum Download von Dateien.
Syntax: wget [OPTION]... [URL]...

Erforderliche Argumente zu langen Optionen sind auch bei kurzen Optionen erforderlich.

Beim Start:
-V, --version Programmversion anzeigen und beenden
-h, --help diese Hilfe anzeigen
:lol: 8) :wink:

Posted: Tue 14 May 2013, 15:56
by Bert
Thank you L18L.

I see one difference:

Where does the name "puppy.pot" come from?

I did:

Code: Select all

 xgettext -o pwsget.pot --no-wrap pwsget.sh
(had to add the 'sh' to pwsget manually)
and got a pwsget.pot

Anyhow, my .pot file looked okay, I think...

EDIT: think I got it :oops: you have the line ready to be pasted with 'puppy.pot' included...saves on typing. De .po is always going to be 'de.po' anyway! (should have thought about it first!)

Trying to learn from failures

Posted: Tue 14 May 2013, 16:26
by L18L
Bert wrote:Where does the name "puppy.pot" come from?
Look into the script pwsget
find TEXTDOMAIN
it is not pwsget.

We could now discuss which TEXTDOMAIN has to be taken.
(puppy is not very useful)

I am voting for "forget pwsget"
But it is good for "learning from failures"

pwsget does not show your failures.
Example:
enter "bla" into Address
enter /root into Dest:
click "OK"

The same input but other output from wget:
my console wrote:# wget -c bla
--2013-05-14 18:31:37-- http://bla/
Auflösen des Hostnamen »bla (bla)«.... fehlgeschlagen: Der Name oder der Dienst ist nicht bekannt.
wget: unable to resolve host address `bla'
#

Re: Trying to learn from failures

Posted: Tue 14 May 2013, 16:47
by Bert
L18L wrote: Look into the script pwsget
find TEXTDOMAIN
it is not pwsget.
Aha, that's a step I did not know!
Will try.

Thank you!

I understand how you often prefer to use the terminal. But it's not up to me as a translator to tell the Dutch speaking people not to use pwsget -or uGet for that matter (which I also translated, but needs a new version from ppm I think to be localised.)

You are an experienced coder/programmer, please don't forget 99.36% of the population is afraid of things called 'console' and feels completely at home in a verbose-less environment, just icons to click or touch... :wink:

edit: btw I had wget.mo already included in what will be next langpack. I'm not that prejudised :lol:

Re: Trying to learn from failures

Posted: Tue 14 May 2013, 18:14
by L18L
Bert wrote:...don't forget 99.36% of the population is afraid of things called 'console' and feels completely at home in a verbose-less environment, just icons to click or touch... :wink:
I will try not to forget that.... :oops:

----
Another nut to crack (not for you, Bert..., just for the records):

Help does work only if I copy

export Pwget=' .....
...
...
IFS=$I'

to console. :roll:

Posted: Wed 15 May 2013, 19:31
by Bert
Didn't get pwsget translated :cry: I'll let it rest for a while and will read up on gettexting and commandline translation.

Any practical guides for that? I started reading the 'Gnu Gettext Manual' that sits inside the Poedit Help, but it is boring and not at all practical.

Luckily other translations are going well.

I wrote above my HardInfo translation didn't work, but it does!

I found out I had to replace HardInfo in Precise with the gettexted version from the repo.

How would you guys solve this: by adding the gettexted HardInfo to the langpack? Or just wait and hope the internationalised HardInfo will be default in the next Puppies?

best regards.

Posted: Wed 15 May 2013, 19:57
by vicmz
Bert wrote:Didn't get pwsget translated :cry:
See:
http://murga-linux.com/puppy/viewtopic. ... 715#703715

Trying to learn from failures

Posted: Thu 16 May 2013, 08:30
by L18L
vicmz wrote:
Bert wrote:Didn't get pwsget translated :cry:
See:
http://murga-linux.com/puppy/viewtopic. ... 715#703715
Well done vicmz 8) you have learnt from failures :lol:

Bert,
general rule for translators should be:
if momanager cannot handle it post it here.

general rule for "gettexters" is:
If it does not run in momanager there is a failure!
If there is no failure then distribute the .pot file
Bert wrote:How would you guys solve this: by adding the gettexted HardInfo to the langpack? Or just wait and hope the internationalised HardInfo will be default in the next Puppies?
Just wait is the easiest way.
In case of hardinfo a bug report has helped.

Posted: Thu 16 May 2013, 16:53
by Bert
Thanks again for all helpful replies, vlcmz and L18L.

What did I learn from the pwsget failure?

1. stay away from 'xgettexting' :wink:
2. As soon as momanager becomes unstable, stop translating and install a new puppy first!

I do not know where the instability comes from, difficult to pinpoint, but so far it keeps returning after using momanager for a while. It could be:

* Me ...
* hardware, running from usb key on cheap card reader. ( changed now to frugal from internal HDD)

As for poor little pwsget...it was translated successfully in minutes using momanager-20130512 8)

We'll get there... sooner or later

Just for fun

Posted: Thu 16 May 2013, 20:38
by Bert
By the way, now that we're all sick of the subject pwsget...

It says in it's title: Pwget. That's easy: Puppy_wget.

But it's called pwsget???

Could that be 'Lobster speaking': "Puppy, we shall get " ?

Or: "Puppy, we shall get [there] "?

Or, still 'Lobster speaking': "'Puppy, we shall get [you] "?

Ah Lobster, I miss him.

Anyone knows where he is hanging out?

Re: Trying to learn from failures

Posted: Thu 16 May 2013, 22:20
by vicmz
L18L wrote: Well done vicmz 8) you have learnt from failures :lol:
Yes, I had lots of failures. :lol:
Don't be so modest, you're an excellent teacher! If it weren't by you I wouldn't have this skill -- and even if I still have a lot to learn it's really helpful. :D

Trying to learn from failures

Posted: Fri 17 May 2013, 18:18
by L18L
On his blog BarryK wrote:When you post code, post it as code, not as a quote. This is very important.
see http://bkhome.org/blog2/?viewDetailed=00248