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:

#61 Post by xanad »

Ciao Robwoj44, thanks again :D
Quirky 7 problem...
pcreatetorrent works fine on Tahr Slacko and Precise but with Quirky 7 the file does not start ... I think it's a problem of GTK3. The line 180 is the culprit.
With this modification works:
from

Code: Select all

<frame $ (gettext 'Remove/Add tracker - Exit program')>
to

Code: Select all

<frame $ (gettext 'Remove-Add tracker - Exit program')>
where (/) is considered as a code ... and (-) no.
---
@Don570
@L18L
you know an eval_gettext solution?
[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:

#62 Post by xanad »

pcreatetorrent solved.
From

Code: Select all

<frame $ (gettext 'Remove/Add tracker - Exit program')>
To

Code: Select all

<frame """$ (gettext 'Remove/Add tracker - Exit program')""">
Works also for all distros.
pcreatetorrent Quirky 7 version
Attachments
pcreatetorrent.tar.gz
(2.66 KiB) Downloaded 734 times
[url]http://www.xanad.tk[/url] Html5 Parallax

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

#63 Post by don570 »

xanand wrote:I think it's a problem of GTK3
???? Does Quirky have GTK3 ????

I thought Quirky was an experiment to add newly created files to file
system in a different manner.

___________________________________

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

#64 Post by xanad »

???? Does Quirky have GTK3 ????

I thought Quirky was an experiment to add newly created files to file
system in a different manner.

Yes, you are right! Gtk3 missing was the reply sent by the terminal in the previous version. But it was not right :shock:
[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:

#65 Post by xanad »

About PPM v2
ref.: http://murga-linux.com/puppy/viewtopic.php?t=97623

Very difficult to translate. Some observations and some solutions.

- petget

/usr/lib/gtkdialog/
All boxes:
gettext right, translation possible with geany or poeditor, but the gui remain in english...
My no-solution: replace the old 'petget' file in /usr/local/petget... now all works fine.
Please, if anyone has the right solution would be better, the new graphics are better.

- dowloadpkgs.sh

line 37
from

Code: Select all

export LANG=C
to

Code: Select all

#export LANG=C
- installpreview.sh

line 160
from

Code: Select all

<button><label>More info</label><action>/usr/local/petget/fetchinfo.sh ${TREE1} & </action></button>
to

Code: Select all

<button><label>$(gettext 'More info')</label><action>/usr/local/petget/fetchinfo.sh ${TREE1} & </action></button>
line 167
from

Code: Select all

<label>Install ${TREE1}${ONLYMSG}</label>
to

Code: Select all

<label>$(gettext 'Install') ${TREE1}${ONLYMSG}</label>
line 172
from

Code: Select all

<label>Download-only</label>
to

Code: Select all

<label>$(gettext 'Download-only')</label>
- installpkg.sh

line 137
from

Code: Select all

pupmessage -bg '#ff8080' -fg black ${DISPTIME2} -title "$(gettext 'Package:') ${DLPKG_NAME}" "$(gettext 'Sorry, but this package is already installed. Cannot install it twice.')"
to
translation impossible at the moment.

WARNINGS!!!

There are the same 'voices' in 3 different files.
If the translations are not exactly identical, PPM v2 crashes.
This could create confusion.

Here the strings involved:

- pkg_chooser.sh

line 184
"$(gettext 'Download packages (no install)')")

line 200
"$(gettext 'Step by step installation (classic mode)')")

line 513
<item>'$(gettext 'Auto remove')'</item>

line 514
<item>'$(gettext 'Step by step remove (classic mode)')'</item>


- removemodes.sh

line 190
"$(gettext 'Auto remove')") auto_remove;;

line 191
"$(gettext 'Step by step remove (classic mode)')") classic_remove;;

- installmodes.sh


line 426
"$(gettext 'Download packages (no install)')")

line 454
"$(gettext 'Step by step installation (classic mode)')")


"Are also variables that pass from one script to another. If not identical they do not work"... yeah, this is normal :wink: ... but that a translation interfere with the code creating a program crash, I do not think it's normal :shock:
[url]http://www.xanad.tk[/url] Html5 Parallax

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#66 Post by mavrothal »

xanad wrote: Very difficult to translate. Some observations and some solutions.

- petget

/usr/lib/gtkdialog/
All boxes:
gettext right, translation possible with geany or poeditor, but the gui remain in english...
My no-solution: replace the old 'petget' file in /usr/local/petget... now all works fine.
Please, if anyone has the right solution would be better, the new graphics are better.
Since these are external scripts from /usr/lib/gtkdialog/ they have TEXTDOMAIN=libstardust. So translation of the /usr/lib/gtkdialog/box_* scripts should go under that TEXTDOMAIN (I think...)

xanad wrote:- dowloadpkgs.sh

line 37
from

Code: Select all

export LANG=C
to

Code: Select all

#export LANG=C
This is changed long time ago in woof. Maybe you have an older version
xanad wrote:- installpreview.sh
Fixed in woof. Thanks

xanad wrote:- installpkg.sh

line 137
from

Code: Select all

pupmessage -bg '#ff8080' -fg black ${DISPTIME2} -title "$(gettext 'Package:') ${DLPKG_NAME}" "$(gettext 'Sorry, but this package is already installed. Cannot install it twice.')"
to
translation impossible at the moment.
I think this is a problem with the pupmessage that is not internationalized and can not handle internationalization. If any one can take look at /usr/bin/pupmessage and has a suggestion how to fix this, please let me know
Would adding "export TEXTDOMAIN=pupmessage" at the top of the file be sufficient?
xanad wrote:WARNINGS!!!

There are the same 'voices' in 3 different files.
If the translations are not exactly identical, PPM v2 crashes.
This could create confusion.
Correct.
This is fixed in woof few days now, as all relevant scripts went under the same TEXTDOMAIN (=petget___pkg_chooser.sh) so even minor (but detrimental) translation differences can be avoided.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

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

#67 Post by xanad »

Hi Mavrothal,
thanks for the reply.
Since these are external scripts from /usr/lib/gtkdialog/ they have TEXTDOMAIN=libstardust. So translation of the /usr/lib/gtkdialog/box_* scripts should go under that TEXTDOMAIN (I think...)


Everything would work but if the gtkdialog path is in /usr/lib, TEXTDOMAIN is not read by momanager ... but if I move the GtkDialog folder (for ex.), to /usr/bin (or linked) then it works. Now I try to translate that and I tell you.
xanad wrote:
WARNINGS!!!

There are the same 'voices' in 3 different files.
If the translations are not exactly identical, PPM v2 crashes.
This could create confusion.


Correct.
This is fixed in woof few days now, as all relevant scripts went under the same TEXTDOMAIN (=petget___pkg_chooser.sh) so even minor (but detrimental) translation differences can be avoided.
Right solution :D
xanad wrote:
- installpreview.sh


Fixed in woof. Thanks
8)
I think this is a problem with the pupmessage that is not internationalized and can not handle internationalization. If any one can take look at /usr/bin/pupmessage and has a suggestion how to fix this, please let me know
Would adding "export TEXTDOMAIN=pupmessage" at the top of the file be sufficient?


now I try :roll:
[url]http://www.xanad.tk[/url] Html5 Parallax

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#68 Post by mavrothal »

xanad wrote:Hi Mavrothal,
thanks for the reply.
Since these are external scripts from /usr/lib/gtkdialog/ they have TEXTDOMAIN=libstardust. So translation of the /usr/lib/gtkdialog/box_* scripts should go under that TEXTDOMAIN (I think...)


Everything would work but if the gtkdialog path is in /usr/lib, TEXTDOMAIN is not read by momanager ... but if I move the GtkDialog folder (for ex.), to /usr/bin (or linked) then it works. Now I try to translate that and I tell you.
Please do.
These gtkdialog boxes is one of the latest offerings from zigbert and were incorporated to PPM when he overhauled the UI. I do not really know if they support internationalisation of the strings they display :?
The message is displayed from strings with the syntax:

Code: Select all

 [ "$2" ] && S=$S'<text xalign="0" use-markup="true"><label>"'$2'"</label></text>'
where $2, $3 etc are the input strings from the scripts that is calling box_*
They may need to be replaced by

Code: Select all

 [ "$2" ] && S=$S'<text xalign="0" use-markup="true"><label>'$(gettext "$2")'</label></text>'
If it is a bug in the box_* code can hopefully be fixed, if this is not possible, they will need to be replaced by Xdialog or something.
Same is true for pupmessage and is not internationalised at all itself or the messages it displays (though this was in PPM since BK's versions).
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

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

#69 Post by xanad »

Hi Mavrothal,
Find all solutions. (less than 2, but I try again...)
Attached there is a compressed file with all the changed files. Changes are gettext and TEXTDOMAIN. The changes are numerous, and is diffile list them line by line. I suggest using xfdiff to compare files:

/usr/local/petget

- downloadpkgs.sh
- installmodes.sh
- installpkg.sh
- installpreview.sh
- installwindow.sh
- petget
- pkg_chooser.sh
- removemodes.sh
- removepreview.sh
- removewindow.sh
- reportwindow.sh

Libstardust

To work, the following files:

- box_help
- box_ok
- box_splash
- box_yesno

must have as their 'export' in this way:

Code: Select all

export TEXTDOMAIN=libstardust
export OUTPUT_CHARSET=UTF-8
but above all, there must be a link of the /usr/libs/gtkdialog directory to /bin/ (I put it here because there are already other files named 'gtkdialog' in /usr/bin and /usr/sbin)
otherwise momanager does not recognize it.

----

Probably something it still missed and it would be highly advisable that some other translator tried to write a translation to find more problems.
Attachments
ppm2_mods.tar.gz
(49.15 KiB) Downloaded 599 times
[url]http://www.xanad.tk[/url] Html5 Parallax

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#70 Post by mavrothal »

xanad wrote:Hi Mavrothal,
Find all solutions. (less than 2, but I try again...)
Attached there is a compressed file with all the changed files. Changes are gettext and TEXTDOMAIN. The changes are numerous, and is diffile list them line by line. I suggest using xfdiff to compare files:

/usr/local/petget

- downloadpkgs.sh
- installmodes.sh
- installpkg.sh
- installpreview.sh
- installwindow.sh
- petget
- pkg_chooser.sh
- removemodes.sh
- removepreview.sh
- removewindow.sh
- reportwindow.sh

Libstardust

To work, the following files:

- box_help
- box_ok
- box_splash
- box_yesno

must have as their 'export' in this way:

Code: Select all

export TEXTDOMAIN=libstardust
export OUTPUT_CHARSET=UTF-8
but above all, there must be a link of the /usr/libs/gtkdialog directory to /bin/ (I put it here because there are already other files named 'gtkdialog' in /usr/bin and /usr/sbin)
otherwise momanager does not recognize it.

----

Probably something it still missed and it would be highly advisable that some other translator tried to write a translation to find more problems.
Thanks xanad.
However it does appear to have an older PPM.
If is not too much trouble, and you have the modified PPM running in you system happily, please do the following:
clone goof-ce git (

Code: Select all

got clone https://github.com/puppylinux-woof-CE/woof-CE.git
)
Then copy the patch generator script in a file just outside the woof-CE git folder (make sure that no spaces are added at the end of the lines - the forum does that lately), make it executable and run it.
Will record all the differences between your running system and the current woof-CE. Discard everything else and just leave the PPM/gtkdialog patches.

BTW I just looked at some briefly. Do you really need to export

Code: Select all

export TEXTDOMAIN=petget___downloadpkgs.sh
export OUTPUT_CHARSET=UTF-8
before every dialog or redirection?
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

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

#71 Post by xanad »

Hi Mavrothal,
However it does appear to have an older PPM.

I am using this version. Any another?
http://murga-linux.com/puppy/viewtopic.php?t=97623
If is not too much trouble, and you have the modified PPM running in you system happily, please do the following:
clone goof-ce git

Oh, no. In my opinion, it is early. We should get feedback from other translators. Only they can make sure everything is ok. No devs. You should ask ASRI or Vicmz or Robwoj44 or ... to translate and test.
BTW I just looked at some briefly. Do you really need to export
Code:

Code: Select all

export TEXTDOMAIN=petget___*
export OUTPUT_CHARSET=UTF-8	
before every dialog or redirection?
At the moment, yes. But there could be other solutions, I think. The rule is this to function, it can definitely be better written.

remain unsolved:
- "Please wait, processing ..."
- pupmessage
- "That Testing packages exist in repository"

Some Italian users are testing the changes.

To facilitate testing I created a pet PPM v2 + libstardust with the changes.
Attachments
patch_ppm_v2.pet
(81.16 KiB) Downloaded 699 times
[url]http://www.xanad.tk[/url] Html5 Parallax

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#72 Post by mavrothal »

xanad wrote:
However it does appear to have an older PPM.

I am using this version. Any another?
http://murga-linux.com/puppy/viewtopic.php?t=97623
This is the last pet, and is 4 months old by now. PPM2 is now merged into woof-CE and there are several changes there. If you clone woof-CE and you go to the testing branch (by the command "git checkout testing") you'll get the latest.
Most of the files are in woof-code/rootfs-skeleton/usr/local/petget.
0setup is in woof-code/.
You may also want to get woof-code/rootfs-skeleton/usr/sbin/download_file that is used for the package downloading and has some messages seen in PPM.
Finally, find_cat, debdb2pupdb and printcols are binary files that do not need translation but latest versions speedup some PPM functions (db update). They are in woof-arch/{x86,x86_64}/build/support/.
xanad wrote:Some Italian users are testing the changes.

To facilitate testing I created a pet PPM v2 + libstardust with the changes.
Is there any ISO with all these changes to test? I understand (very) little Italian and I can use Google-translate :wink:
xanad wrote:remain unsolved:
- "Please wait, processing ..."
<snip>
- "That Testing packages exist in repository"
"Please wait..." appears in 3 scripts, filterpkgs.sh, dependencies.sh and installpreview.sh. Do you know which one gives the problem?

Try

Code: Select all

echo "$(gettext 'Testing that packages exist in repository')" > /tmp/petget/install_status
To see if it works.

Latter: Some of the changes are already incorporated into woof. So would be nice if you can test the current version of the scripts
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

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

#73 Post by xanad »

Most of the files are in woof-code/rootfs-skeleton/usr/local/petget.
ok, now I get them
Is there any ISO with all these changes to test? I understand (very) little Italian and I can use Google-translate


yes, T64 https://copy.com/Z6RUw0xZjgbCq4d2
and then install this
http://murga-linux.com/puppy/viewtopic. ... h&id=91109
"Please wait..." appears in 3 scripts, filterpkgs.sh, dependencies.sh and installpreview.sh. Do you know which one gives the problem?

"Please wait, processing..." is in installpkg.sh
echo "$(gettext 'Testing that packages exist in repository')" > /tmp/petget/install_status
now I try
[url]http://www.xanad.tk[/url] Html5 Parallax

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#74 Post by mavrothal »

xanad wrote: now I try
Here is the latest PPM version from woof plus some more changes.
You may want to test without further changes/modification (at least for the begining)
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#75 Post by mavrothal »

I think I got it
Check the latest woof-CE commits
Attachments
Italian_pupmessage.png
(57.35 KiB) Downloaded 356 times
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

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

#76 Post by xanad »

:D works fine.

Code: Select all

LANG=$LANG_USER
is better than

Code: Select all

export TEXTDOMAIN=petget___installpkg.sh
PS: I noticed that all buttons (yes,no,cancel,etc) are untranslatable :roll:
[url]http://www.xanad.tk[/url] Html5 Parallax

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#77 Post by mavrothal »

xanad wrote: PS: I noticed that all buttons (yes,no,cancel,etc) are untranslatable :roll:
Where? Which script?
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

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

#78 Post by xanad »

mavrothal wrote:
xanad wrote: PS: I noticed that all buttons (yes,no,cancel,etc) are untranslatable :roll:
Where? Which script?
gtkdialog
ex:

Image

Code: Select all

<button>
      '"`/usr/lib/gtkdialog/xml_button-icon yes`"'
      <label>" '$(gettext 'Yes')' "</label>
      <action>EXIT:yes</action>
    </button>
[url]http://www.xanad.tk[/url] Html5 Parallax

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#79 Post by mavrothal »

xanad wrote:

Code: Select all

<button>
      '"`/usr/lib/gtkdialog/xml_button-icon yes`"'
      <label>" '$(gettext 'Yes')' "</label>
      <action>EXIT:yes</action>
    </button>
These are coming from /usr/lib/gtkdialog/box_yesno. Right?
So you have the "yes" string translation in libstardust.mo and still fails? :?

BTW the latest momanager picks up /usr/lib/gtkdialog/ fine. No need for links to bin.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

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

#80 Post by xanad »

These are coming from /usr/lib/gtkdialog/box_yesno. Right?
So you have the "yes" string translation in libstardust.mo and still fails?
yes
BTW the latest momanager picks up /usr/lib/gtkdialog/ fine. No need for links to bin.
ok, well
[url]http://www.xanad.tk[/url] Html5 Parallax

Post Reply