Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 24 Oct 2014, 03:17
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
jwm_tools-0.9 (was jwm_menu_create)
Post new topic   Reply to topic View previous topic :: View next topic
Page 7 of 9 [124 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9 Next
Author Message
musher0


Joined: 04 Jan 2009
Posts: 4256
Location: Gatineau (Qc), Canada

PostPosted: Fri 10 Feb 2012, 23:36    Post subject:  

Thanks for the explanation.

Regards,

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4353

PostPosted: Fri 10 Feb 2012, 23:51    Post subject:  

the translation files for jwm_menu_create are here:
/usr/share/locale/<your_language>/LC_MESSAGES/jwm

If anyone would like to add/improve translations I will include them in a minor point release. (I am working on another project in C/gtk1 at the moment, so jwm tools are on the back burner unless I have a eureka moment on adding tray support in a comprehensive way)

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 4256
Location: Gatineau (Qc), Canada

PostPosted: Sat 11 Feb 2012, 00:15    Post subject:  

Hi, sc0ttman.

If it's ok with everyone, and in particular with technosaurus, I'll see what I can do to clean up and improve the French translation you initially asked Google... >;-< to provide. This is sort of an honour thing for me, since I translate EN->FR for a living... I'd hate to see my dear Puppy become the laugh of Francophones worlwide because of a google-esque menu.

To give you some context, this is one of the things professional translators do to have fun: we gather 'round a computer and send sentences to Google for translation. Unmistakably, we come out of these little sessions with our ribs hurting because we laughed so much. Google translations are usually way off, that's why they're so funny.

To come back to the subject at hand : I have the Toutou FAT version installed so I'll try to use argolance's translations as much as possible -- with his permission, of course.

Can I PM you for explanations on the script you provided? The translation itself shouldn't be difficult, but I want to make sure I understand where to place everything so it works.

BFN and thanks in advance.

musher0

[quote="sc0ttman"]I should probably post this elsewhere, but anyway...

This little script will get google translations your .desktop files, based on the english "Name=" .. It should then put the new translation into the correct .desktop file, if no transltion was already found for your chosen language..

A folder /usr/share/applications/[lang] is created, look in there for all the translations...

I ran it a few times, for de, fr, es .. Seems to work OK for me, but I havent tested the 2nd loop, which actually adds them back in to the original .desktop files.. Running it now.. not the fastest script ever!

Code:
#!/bin/sh
LOC=ru
DIR="/usr/share/applications/${LOC}"
[ -d ${DIR} ] || mkdir "${DIR}"
for file in /usr/share/applications/*; do
   [ -f $file ] && name=$(cat "$file" | grep '^Name=')
   name1=${name#*[}
   name1=${name1%]*}
   name1=${name1/Puppy /XPUP}
   sleep "4.${RANDOM}"
   name_loc=`wget -qO- "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=${name1#*=}&langpair=en|${LOC}" | sed 's/.*"translatedText":"\([^"]*\)".*}/\1\n/'`
   name_loc=${name_loc/XPUP/Puppy }
   echo "Name[${LOC}]=${name_loc/ \\u003d /=}" > $DIR/$(basename $file)
done

for file in /usr/share/applications/*; do
   en_name=`$(cat $file) | grep "Name\[$LOC\]"`
   if [ "$en_name" = "" ];then
      name_loc="`cat $DIR/$(basename $file)`"
      [ "$name_loc" != "" ] && echo "$name_loc" >> "$file"
   fi
done


For example, heres the French output ..probably half nonsense and more sanitation is required (see 'd\u0026#39;') :

Code:

Name[fr]=Accès-Finder
Name[fr]=Alsamixer - mélangeur audio
Name[fr]=Assistant son ALSA
Name[fr]=Asunder - CD Ripper
Name[fr]=Émulateur de terminal aterm
Name[fr]=Xautoconnect au réseau sans fil
Name[fr]=Chiot accélérateur de téléchargement
Name[fr]=BashBurn - Graver un CD / DVD
Name[fr]=BashPodder - Podcast gestionnaire
Name[fr]=Bluefish Editor
(...)

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4353

PostPosted: Sat 11 Feb 2012, 00:53    Post subject:  

to get all of the desktop files Name= parameter

grep "Name=" /usr/share/applications/* |sed "s/=/\[fr\]=/" >translatable_file

that can be used for adding them back (via separate script)

if anyone else would like to do that for other languages just replace fr with your 2 letter language code

fyi, I have mentioned this before, but just so you know up front. Many of these desktop files originally had proper translations, but were stripped out to save size; however many packagers will still put the full version of the desktop file in the corresponding NLS package (that's what I typically do) ... anyhow, installing an NLS package afterwards may clobber your translations with the "official" ones if you do them in the desktop files directly - that would be frustrating as hell, which is why I suggest using a separate file

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 4256
Location: Gatineau (Qc), Canada

PostPosted: Tue 14 Feb 2012, 21:23    Post subject:
Subject description: file /usr/share/locale/fr_CA.utf8/LC_MESSAGES/jwm
 

For now, here is a "jwm" fr_CA file, the one that goes in /usr/share/locale/fr_CA.utf8/LC_MESSAGES/.

This could also go in

/usr/share/locale/fr_CA/LC_MESSAGES/jwm, if one is not using utf8. Or in

/usr/share/locale/fr/LC_MESSAGES/jwm, if our Francophone friends from Europe find it suitable. There are subtle differences in the way Francophones from different countries label menus and sub-menus -- and obviously, individuals.

I have used an "adjective" form at times for sub-menus, to keep the width of the menu from spreading.

So here it is. Constructive criticisms -- that aim to improve things -- are welcome.

Code:

jwm_Desktop="Bureau"
jwm_DesktopSettings="Paramètres..."
jwm_DesktopCountry="...régionaux"
jwm_DesktopApplets="Applets"
jwm_System="Système"
jwm_SystemConfig="Configuration"
jwm_SystemMemory="Mémoire"
jwm_SystemSchedule="Chronos"
jwm_Setup="Paramètres"
jwm_SetupEntry="...système"
jwm_SetupWizard="Assistants"
jwm_SetupUtility="Utilitaires"
jwm_Utility="Utilitaires"
jwm_UtilityUtilities="...généraux"
jwm_UtilityArchiving="Copies de réserve"
jwm_UtilityConsole="Terminaux"
jwm_Filesystem="Fichiers"
jwm_FilesystemManager="Gestionnaires"
jwm_FilesystemMount="Monteurs"
jwm_FilesystemUtilities="Utilitaires"
jwm_FilesystemFind="Recherches"
jwm_Graphic="Graphisme"
jwm_GraphicGraphics="Visionneurs"
jwm_GraphicEdit="Éditeurs"
jwm_GraphicUtility="Utilitaires"
jwm_Calculate="Calculs"
jwm_Document="Documents"
jwm_DocumentCompose="Composition"
jwm_DocumentText="Éditeurs"
jwm_DocumentUtilities="Utilitaires"
jwm_Business="Affaires"
jwm_BusinessSheets="Tableurs"
jwm_BusinessCalculator="Calculatrices"
jwm_BusinessUtilities="Utilitaires"
jwm_Personal="Personnel"
jwm_PersonalPlan="Organiseurs"
jwm_PersonalUtilities="Chronos"
jwm_Network="Réseau"
jwm_NetworkDialup="...téléphonique"
jwm_NetworkRemote="Cable /SF"
jwm_Internet="Internet"
jwm_InternetWWW="WWW"
jwm_Multimedia="Multimédia"
jwm_MultimediaMedia="Médias"
jwm_MultimediaBurn="Gravure"
jwm_Fun="Jeux"
jwm_Help="Aide"
jwm_Shutdown="SESSION"
jwm_Exit="Sortie à la console"
jwm_Reboot="Redémarrer l'ordi"
jwm_Poweroff="Arrêter l'ordi"
jwm_RestartX="Relancer le serveur X"
jwm_RestartJWM="Redémarrer JWM"


I perused argolance's *.desktop designations in his "Toutou - FAT- RELOADED" as well as his jwm menu and program names, and it seems that the French team has been using workarounds -- not naming the program per se but substituting to it a very short description of what it does. So, the longer translation will have to wait a couple of days.

BFN

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
01micko


Joined: 11 Oct 2008
Posts: 7835
Location: qld

PostPosted: Thu 16 Feb 2012, 06:55    Post subject:
Subject description: file /usr/share/locale/fr_CA.utf8/LC_MESSAGES/jwm
 

musher0 wrote:
For now, here is a "jwm" fr_CA file, the one that goes in /usr/share/locale/fr_CA.utf8/LC_MESSAGES/.

This could also go in

/usr/share/locale/fr_CA/LC_MESSAGES/jwm, if one is not using utf8. Or in

/usr/share/locale/fr/LC_MESSAGES/jwm, if our Francophone friends from Europe find it suitable. There are subtle differences in the way Francophones from different countries label menus and sub-menus -- and obviously, individuals.

I have used an "adjective" form at times for sub-menus, to keep the width of the menu from spreading.

So here it is. Constructive criticisms -- that aim to improve things -- are welcome.

I perused argolance's *.desktop designations in his "Toutou - FAT- RELOADED" as well as his jwm menu and program names, and it seems that the French team has been using workarounds -- not naming the program per se but substituting to it a very short description of what it does. So, the longer translation will have to wait a couple of days.

BFN


Well for now would any native French users say Musher0's translation effort beats techno's google effort? If so I'll put it in Slacko.

TIA

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4353

PostPosted: Thu 16 Feb 2012, 10:57    Post subject:  

It seems ok to a non-native speaker, but is it necessary to have "SESSION" in all caps? ..or is that based on a distro/puplet specific shutdown script?
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2527
Location: Moved from Hosla to www.eussenheim.de

PostPosted: Sat 18 Feb 2012, 13:07    Post subject: jwm_param_gui
Subject description: updated
 

tested and fixed:
- SUBMENU
- DRIVES
added
- LANGUAGE

screenshot see
http://murga-linux.com/puppy/viewtopic.php?t=75209&start=403

----------------------
edited
buggy
use version 0.7.3 (4 posts down) please.
jwm_param_gui.gz
Description  rename to jwm_param_gui
gz

 Download 
Filename  jwm_param_gui.gz 
Filesize  3.39 KB 
Downloaded  333 Time(s) 

Last edited by L18L on Sun 19 Feb 2012, 06:18; edited 1 time in total
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Sat 18 Feb 2012, 19:49    Post subject:  

technosaurus wrote:
BarryK wrote:
technosaurus,
Note that the fixmenus in Woof has some extra functionality, to support the 'menu_strings' SSS domain. See file:

http://bkhome.org/fossil/woof2.cgi/artifact/3d3821678a5e65a2bfabe6bc72625f6564d629e6

Note, putting that extra code in will not matter for puppies that don't have menu_strings, as it tests for existence of the file.
I think these are already translated in jwm_menu_create ... and many more (Thank others, I barely speak english, but am fluent in shell)


Ok.

For the record, that link to Fossil repo is out of date, the fixmenus file has changed considerably:

http://bkhome.org/fossil/woof2.cgi/artifact/3ab5cfad3d75084b30c5a1f4eabb10aa4298e9dc

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4353

PostPosted: Sat 18 Feb 2012, 22:18    Post subject:  

I'll probably do a new minor point release this week with some xlations, but I want to do a little experiment first ... export LANG=C after the translation variables are loaded to see if 1. Translations stick with proper characters and such, and 2. Test speed difference

If anyone has more bug/translation fixes ...

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7835
Location: qld

PostPosted: Sun 19 Feb 2012, 02:34    Post subject:  

I believe there is a feature request [of sorts] for <StartupCommand> integration... here .. if you're interested.
_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
L18L

Joined: 19 Jun 2010
Posts: 2527
Location: Moved from Hosla to www.eussenheim.de

PostPosted: Sun 19 Feb 2012, 06:15    Post subject: jwm_param_gui
Subject description: bugfix 0.7.3
 

technosaurus wrote:
...
If anyone has more bug/translation fixes ...


Tested jwm_para_gui in latest racy
did not work because no config file

A config file is being created by jwm_menu_create.

I have integrated this into jwm_param_gui together with adding the LANGUAGE parameter

Code:
# create missing config file ~/.jwm/JWMRC and missing LANGUAGE parameter

version=0.7.3


--------
Maybe moving the location of translation files
from
/usr/share/locale/*/LC_MESSAGES/jwm
to
/usr/share/locales/*/jwm
is a good idea?

________________________________

edit
NOTE, background image does not change
jwm_param_gui is just changing values in JMRC
jwm_param_gui.gz
Description  remove .gz
gz

 Download 
Filename  jwm_param_gui.gz 
Filesize  3.68 KB 
Downloaded  323 Time(s) 

Last edited by L18L on Sun 19 Feb 2012, 13:48; edited 1 time in total
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2385
Location: UK

PostPosted: Sun 19 Feb 2012, 07:54    Post subject:  

technosaurus wrote:
I want to do a little experiment first ... export LANG=C after the translation variables are loaded to see if 1. Translations stick with proper characters and such, and 2. Test speed difference

I'm 90% sure that works.

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 4256
Location: Gatineau (Qc), Canada

PostPosted: Sun 19 Feb 2012, 12:09    Post subject:  

technosaurus wrote:
It seems ok to a non-native speaker, but is it necessary to have "SESSION" in all caps? ..or is that based on a distro/puplet specific shutdown script?


Hi, technosaurus.

No, it could be "Session", but AFAIK there seems to be a consensus in Toutou's to have it in caps. Maybe to bring attention to this item, as if saying "this is where you control your session". I don't care either way, really.

BFN

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
musher0


Joined: 04 Jan 2009
Posts: 4256
Location: Gatineau (Qc), Canada

PostPosted: Sun 19 Feb 2012, 12:14    Post subject:  

01micko wrote:
>Well for now would any native French users say Musher0's translation effort beats techno's google effort? If so I'll put it in Slacko.

If you use the Google one... at least make sure you have the "Calculate" item read "Calculs" and not "Calcus" -- which could as well be "Cactus"...(ouch) or even something vulgar...

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 7 of 9 [124 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1069s ][ Queries: 13 (0.0054s) ][ GZIP on ]