bootmanager buttons - no translations [SOLVED]

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
xanad
Posts: 400
Joined: Fri 28 Feb 2014, 14:56
Location: 2 locations: MonteRosa Alp and Milano
Contact:

bootmanager buttons - no translations [SOLVED]

#1 Post by xanad »

Hi all,
Completing a translation I found myself faced with a problem, that I can not solve.
Some buttons are not translated. Inside the script of bootmanager, gettext is right. In /LC_MESSAGES, there is the translated file xdialog.mo. But they do not work ...
Any suggestions?
Thank you in advance.

Image

ps: Other programs have the same problem.
Last edited by xanad on Thu 22 Oct 2015, 19:53, edited 1 time in total.
[url]http://www.xanad.tk[/url] Html5 Parallax

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

Re: bootmanager buttons - no translations

#2 Post by mavrothal »

xanad wrote:Hi all,
Completing a translation I found myself faced with a problem, that I can not solve.
Some buttons are not translated. Inside the script of bootmanager, gettext is right. In /LC_MESSAGES, there is the translated file xdialog.mo. But they do not work ...
Any suggestions?
Thank you in advance.

ps: Other programs have the same problem.
Looks like that these are old Xdialogs that were never fully gettext.
In the extra SFS loading case for example look at ~line 195 of bootmanager it should have

Code: Select all

--ok-label "$(gettext 'OK')" 
same for --cancel-label. Unfortunately, Xdialog does not have --help-label :cry: so you can use a different approach providing an Xdialog.po/mo that should also cover OK and Cancel.

If you identify and correct all these instances pleeeease provide a patch for woof-CE since you'll have done all the work so we will not need to rediscover the wheel next time.
== [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:

#3 Post by xanad »

Hi mavrothal,
--ok-label \"$(gettext 'OK')\"
ok, it only works with OK and Cancel, not with Help, Add and Remove :cry:
different approach
dont work in Tahr, other path?

I found this thread, it may be useful?
http://ftp.vim.org/ibiblio/distribution ... tton.patch
extract:

Code: Select all

#ifdef FRENCH            /* french translations without NLS */
 #   define OK "OK"
 #   define CANCEL "Annuler"
+#   define EXTRA "Supplémentaire"
 #   define YES "Oui"
 #   define NO "Non"
 #   define HELP "Aide"
@@ -76,6 +77,7 @@
 #   define HIDE_TYPING "Masquer la saisie"
 #else
 #   define OK _("OK")
+#   define EXTRA _("Extra")
 #   define CANCEL _("Cancel")
 #   define YES _("Yes")
 #   define NO _("No")
[url]http://www.xanad.tk[/url] Html5 Parallax

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

#4 Post by mavrothal »

xanad wrote:
different approach
dont work in Tahr, other path?

I found this thread, it may be useful?
http://ftp.vim.org/ibiblio/distribution ... tton.patch
extract:

Code: Select all

#ifdef FRENCH            /* french translations without NLS */
 #   define OK "OK"
 #   define CANCEL "Annuler"
+#   define EXTRA "Supplémentaire"
 #   define YES "Oui"
 #   define NO "Non"
 #   define HELP "Aide"
@@ -76,6 +77,7 @@
 #   define HIDE_TYPING "Masquer la saisie"
 #else
 #   define OK _("OK")
+#   define EXTRA _("Extra")
 #   define CANCEL _("Cancel")
 #   define YES _("Yes")
 #   define NO _("No")
This is in the source code, so you'll need to recompile Xdialog.

You may want to check with L18L and/or Bert about the exact process and the paths for the Xdialog nls of builtins.
== [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:

#5 Post by xanad »

Hi mavrothal,
solved :D view attachments
puppy has a very outdated version...

Et Voilà

Image
Attachments
xdialog-2.3.1-x86_64.pet
(36.08 KiB) Downloaded 260 times
xdialog-2.3.1-i486.pet
(33.11 KiB) Downloaded 274 times
[url]http://www.xanad.tk[/url] Html5 Parallax

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

#6 Post by mavrothal »

xanad wrote:Hi mavrothal,
solved :D view attachments
puppy has a very outdated version...
Nice.
However, every puppy I checked from Precise onwards reports Xdialog 2.3.1, like the attached pet :? ,
How is this different? Is it compiled differently (how)? Has a different source code (where is it)?
== [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:

#7 Post by xanad »

Alien version (Jun 2015) from slackware repo:
http://www.slackware.com/~alien/slackbuilds/xdialog/
[url]http://www.xanad.tk[/url] Html5 Parallax

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

#8 Post by mavrothal »

xanad wrote:Alien version (Jun 2015) from slackware repo:
http://www.slackware.com/~alien/slackbuilds/xdialog/
Good find.
But this is actually the same Xdialog from the source of 2007 that all puppies since then have!
What this Slackware package has is the .mo files for a number of languages including Italian. You can just add /usr/share/locale/it from the package to your language pet and it should work in any puppy without the rest of the stuff :wink:
== [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:

#9 Post by xanad »

mavrothal wrote:
xanad wrote:Alien version (Jun 2015) from slackware repo:
http://www.slackware.com/~alien/slackbuilds/xdialog/
Good find.
You can just add /usr/share/locale/it from the package to your language pet and it should work in any puppy without the rest of the stuff :wink:
Sorry, It does not work for me. Not so.
[url]http://www.xanad.tk[/url] Html5 Parallax

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

#10 Post by mavrothal »

xanad wrote: Sorry, It does not work for me. Not so.
You are right!
I do not know where 666phil got/compiled Xdialog for Tahrpup64 (is not in the Ubuntu repos), but indeed it does not work.
However, if you compile Xdialog from source in Tahr and provide the mo files, works fine.
You may want to alert 666phil on that.
== [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] ==

Post Reply