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 Tue 21 Nov 2017, 17:12
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects » Localization Project
official (momanager) language packs
Moderators: Lobster, MU, raffy
Post new topic   Reply to topic View previous topic :: View next topic
Page 18 of 20 [298 Posts]   Goto page: Previous 1, 2, 3, ..., 16, 17, 18, 19, 20 Next
Author Message
ASRI éducation


Joined: 09 May 2009
Posts: 3203
Location: France

PostPosted: Sat 13 Jun 2015, 08:55    Post subject: woof-ce-testing: pdesktop translation with momanager  

I just created a Puppy Precise version based on the latest version of woof-ce-testing (20150611).

My problem: I can not translate the last Zigbert interfaces.
momanager does not show me the files to translate.

An example: how do you translate pdesktop Apps?

Thank you in advance for your advice.

_________________
Projet ASRI éducation => Association | Forum | Dépôt | Espace kids
Back to top
View user's profile Send private message Visit poster's website 
don570


Joined: 10 Mar 2010
Posts: 4755
Location: Ontario

PostPosted: Sat 13 Jun 2015, 13:29    Post subject:  

Just a suggestion --->

Do the translation in a Puppy distro that is working correctly and bring the
mo files into your Precise distro.

Certain versions of momanager would not show the list of gettext'd scripts
on left side of pane.

______________________
Back to top
View user's profile Send private message 
xanad


Joined: 28 Feb 2014
Posts: 400
Location: 2 locations: MonteRosa Alp and Milano

PostPosted: Sat 13 Jun 2015, 13:36    Post subject: Re: woof-ce-testing: pdesktop translation with momanager  

ASRI éducation wrote:
I just created a Puppy Precise version based on the latest version of woof-ce-testing (20150611).

My problem: I can not translate the last Zigbert interfaces.
momanager does not show me the files to translate.

An example: how do you translate pdesktop Apps?

Thank you in advance for your advice.


pdesktop has no the 'export' to momanaqer, if you want try this in attachment
note: what other apps are not read by momanager?
pdesktop_mod.tar.gz
Description 
gz

 Download 
Filename  pdesktop_mod.tar.gz 
Filesize  1.04 KB 
Downloaded  194 Time(s) 

_________________
www.xanad.tk Html5 Parallax
Back to top
View user's profile Send private message Visit poster's website 
L18L

Joined: 19 Jun 2010
Posts: 3431
Location: www.eussenheim.de/

PostPosted: Wed 14 Oct 2015, 06:53    Post subject: MoManager
Subject description: version 20151010
 

Code:
#151001 translate also .md files (see function get_prop), use AUTHORSPECS in write.log, some code clean up
#151010 fixed pot for mdview; added path of zigbert's stardustlib
What's new

documentation files in .md format can be translated by momanager now. All about jamesbond's mdview
POT files for TEXTDOMAINS from .md files are showing full path script and line number as usual now.

zigbert's libstartdust located under /usr/lib had never be found by momanager before.
Now it is simply managed by having added path of libstardust in momanager's find GETTEXTSCRIPTS.

Download as usual from first page.
Back to top
View user's profile Send private message 
step

Joined: 04 May 2012
Posts: 950

PostPosted: Wed 14 Oct 2015, 07:48    Post subject: Re: MoManager
Subject description: version 20151010
 

L18L wrote:

documentation files in .md format can be translated by momanager now.
Thanks. Can you please show me an example of how a shell script would invoke mdview to show multi-language documentation?
_________________
Fatdog64-710|+Packages|Kodi|Findnrun|+forum|gtkmenuplus
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 3431
Location: www.eussenheim.de/

PostPosted: Wed 14 Oct 2015, 09:46    Post subject: Re: MoManager - mdview support
Subject description: too easy to be true ?
 

step wrote:
L18L wrote:

documentation files in .md format can be translated by momanager now.
Thanks. Can you please show me an example of how a shell script would invoke mdview to show multi-language documentation?

There is nothing special to invoke from a shell script.
But let me make it clear by comparing with shell script.

In shell script it is:
Code:
export TEXTDOMAIN=atextdomain

In mdview it is:
Code:
 %%textdomain anothertextdomain


shell is looking for translations for each message marked by gettext ' '

mdview is looking for translations for each line (except those started with tab).

That's it.

Example: see http://www.murga-linux.com/puppy/viewtopic.php?p=865714#865714

---

mdview is jamesbond's mdview available for fatdog in fatdog's package manager gslapt, maybe also in woof-CE soon.
Back to top
View user's profile Send private message 
step

Joined: 04 May 2012
Posts: 950

PostPosted: Thu 15 Oct 2015, 11:52    Post subject:  

I finally get it! The shell isn't involved in handling localized md documents; mdview does everything by itself. I like it. So a shell script can use mdview to show localized help files by simply including the classic stanza
Code:

# set up localization
TEXTDOMAIN=name_of_shell_script_text_domain
export TEXTDOMAIN

# show help document
mdview "help.md"

for "help.md" like
Code:

%%nopot yes
%%textdomain name_of_shell_script_text_domain
%%nopot no

# SHELL SCRIPT HELP FILE
Bla bla,


Did I get it right?

Actually, I'm still confused. Suppose that a shell script has its own localized messages and displays a localized md file. How should TEXTDOMAIN and %%textdomain be specified? As the same name? If so, there would be a single .po file that mixes the shell catalog with the md catalog? How would I build the source pot file in this case?

_________________
Fatdog64-710|+Packages|Kodi|Findnrun|+forum|gtkmenuplus
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 3431
Location: www.eussenheim.de/

PostPosted: Fri 16 Oct 2015, 04:29    Post subject: mdview  

step wrote:
I finally get it! The shell isn't involved in handling localized md documents; mdview does everything by itself. I like it. So a shell script can use mdview to show localized help files by simply including the classic stanza
Code:

# set up localization
TEXTDOMAIN=name_of_shell_script_text_domain
export TEXTDOMAIN

# show help document
mdview "help.md"

for "help.md" like
Code:

%%nopot yes
%%textdomain name_of_shell_script_text_domain
%%nopot no

# SHELL SCRIPT HELP FILE
Bla bla,


Did I get it right?

Maybe a bit "too" right.
You have declared and exported a TEXTDOMAIN in the shell script.
Thus your help.md can be just:
Code:
# HELP

Bla bla,


Declaration of %%textdomain inside .md is just for use of Puppy's momanager which cannot mix and match different METHODs in a TEXTDOMAIN.

step wrote:
Actually, I'm still confused. Suppose that a shell script has its own localized messages and displays a localized md file. How should TEXTDOMAIN and %%textdomain be specified? As the same name? If so, there would be a single .po file that mixes the shell catalog with the md catalog? How would I build the source pot file in this case?

Yes, do it manually:
append output of mdview --po ... to existing pot file.

If this is for your findnrun, try it this way and there is hope for momanager will use your "hand made" pot file.
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 2909

PostPosted: Fri 16 Oct 2015, 11:00    Post subject:  

@L18L
I just hacking your momanager a bit but then I thought I might not need to rediscover the wheel and ask. Shocked

The idea is to have momanager scan rootfs-skeleton and rootfs-packages in woof-CE and generate the pot files that can be then used for translations, each language in its own git folder.
For general use momanager could be modified to accept user-defined input and output directories if it does not already (does it Embarassed ?).
This should not be too hard (from my little hacking).
What would be tricky I think, would be to go through existing pot and po files and change only what is new. And I guess for the pot files it could even rewrite them but you sure need to keep existing translation strings in the po files that are unaffected from the changes in the original scripts.

I know there are more complicated and efficient approaches for collaborative translations (pootle comes to mind) but I have the feeling that most translations are a single (or 2) person show.

Any thoughts?

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 3431
Location: www.eussenheim.de/

PostPosted: Sat 17 Oct 2015, 05:18    Post subject: hacking momanager
Subject description: many thoughts
 

One note firstly, it is and I hope it will always be Barry's momanager.
I mean the idea and practice of this "all-in-ine" script for translating an entire distribution.
My additions came from practical translating, e.g. sorting,tunig for speed, caching, using fuzzy,etc
ASRI gave some input too
Barry again, (see comments in the script) could upgrade some messages about quirky and woof-Q
Thus any useful input of mavrothal would be appreciated.
Momanager was meant to be for translators only.
Developers when testing their work in progress, not being able to use the command line tools, should manually delete the actual pot file in /tmp/momanager if there have been changes concerning gettext then mightbe they could momanager too.

mavrothal wrote:
The idea is to have momanager scan rootfs-skeleton and rootfs-packages in woof-CE and generate the pot files that can be then used for translations, each language in its own git folder.
Sounds good. Would woof-Q be allowed to use them too?
BTW, there are many messages that contain "Puppy" or "Quirky".
Using a variable for this would be very nice.("Puppy Slacko", "Puppy Tahr", ...) . Building a langpack would be changed.

mavrothal wrote:
For general use momanager could be modified to accept user-defined input and output directories if it does not already (does it Embarassed ?).
This should not be too hard (from my little hacking).
There is a /root/.config/momanager.conf, defining output directory o f language, e.g. pt or pt_BR
Input is hardcoded at the moment, see "#find all gettext'ed scripts...", you are right: not too hard to change.

mavrothal wrote:
What would be tricky I think, would be to go through existing pot and po files and change only what is new. And I guess for the pot files it could even rewrite them but you sure need to keep existing translation strings in the po files that are unaffected from the changes in the original scripts.
No need for tricks and guesses. msgmerge is our friend.

mavrothal wrote:
I know there are more complicated and efficient approaches for collaborative translations (pootle comes to mind) but I have the feeling that most translations are a single (or 2) person show.
... the big advantage of our momanager IMHO: it is included and can be used immediately by anybody. Sharing their works is not everyone's hobby though. . Embarassed

puppy localization [solved]

woof-(2|CE|Q) localization to be solved Wink
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 2909

PostPosted: Sat 17 Oct 2015, 11:10    Post subject: Re: hacking momanager
Subject description: many thoughts
 

L18L wrote:
mavrothal wrote:
The idea is to have momanager scan rootfs-skeleton and rootfs-packages in woof-CE and generate the pot files that can be then used for translations, each language in its own git folder.
Sounds good. Would woof-Q be allowed to use them too?
BTW, there are many messages that contain "Puppy" or "Quirky".
Using a variable for this would be very nice.("Puppy Slacko", "Puppy Tahr", ...) . Building a langpack would be changed.

Not sure what " Would woof-Q be allowed to use them" means. Rootfs-skeleton in woof-Q and woof-CE share a lot of scripts and a lot of the common noarach pets are, well, common Very Happy But I'm not sure will be drop in translation.
Regarding puppy version, putting in /etc/profile something like
Code:
. /etc/DISTRO_SPECS
export Puppy="Puppy $DISTRO_FILE_PREFIX"

and replacing "Puppy" with "$Puppy" in the scripts should do the trick (similar for quirky) but I'm not sure that are so many things specific for the given pupplet that we really need to stretch. Besides most scripts that need translation are distro independent Wink

L18L wrote:
mavrothal wrote:
For general use momanager could be modified to accept user-defined input and output directories if it does not already (does it Embarassed ?).
This should not be too hard (from my little hacking).
There is a /root/.config/momanager.conf, defining output directory o f language, e.g. pt or pt_BR
Input is hardcoded at the moment, see "#find all gettext'ed scripts...", you are right: not too hard to change.

I had the feeling that momanager besides the output directory also puts mo files in /usr/share/locale. Doesn't it?

L18L wrote:
the big advantage of our momanager IMHO: it is included and can be used immediately by anybody. Sharing their works is not everyone's hobby though. . Embarassed

How can you possible "hide" a text file. The moment is out you share it with everyone. Unless you are referring to "sharing the glory" Rolling Eyes Razz

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 3431
Location: www.eussenheim.de/

PostPosted: Sat 17 Oct 2015, 12:53    Post subject: Re: hacking momanager
Subject description: many thoughts
 

mavrothal wrote:
L18L wrote:
mavrothal wrote:
For general use momanager could be modified to accept user-defined input and output directories if it does not already (does it Embarassed ?).
This should not be too hard (from my little hacking).
There is a /root/.config/momanager.conf, defining output directory o f language, e.g. pt or pt_BR
Input is hardcoded at the moment, see "#find all gettext'ed scripts...", you are right: not too hard to change.

I had the feeling that momanager besides the output directory also puts mo files in /usr/share/locale. Doesn't it?

No, not in /usr/share/locale
Only in /usr/share/locale<language code>/LC_MESSAGES.

mavrothal wrote:
L18L wrote:
the big advantage of our momanager IMHO: it is included and can be used immediately by anybody. Sharing their works is not everyone's hobby though. . Embarassed

How can you possible "hide" a text file. The moment is out you share it with everyone. Unless you are referring to "sharing the glory" Rolling Eyes Razz
I am referring to people who searched an found help at the forum but never returned any language pack. Exclamation
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 2909

PostPosted: Sat 17 Oct 2015, 14:57    Post subject: Re: hacking momanager
Subject description: many thoughts
 

L18L wrote:
No, not in /usr/share/locale
Only in /usr/share/locale<language code>/LC_MESSAGES.

Right. But you do not want that if you just woofing around.
Also requiring a non-English locale to be in use so will run needs a workaround if it is just to generate the POT files.

L18L wrote:
I am referring to people who searched an found help at the forum but never returned any language pack. Exclamation
Confused
Unless you have specific persons in mind that you would expect to act differently for some reason, I think that this is the norm in forums like this one. Translation or otherwise.

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 3431
Location: www.eussenheim.de/

PostPosted: Sun 18 Oct 2015, 03:53    Post subject: Re: hacking momanager
Subject description: many thoughts
 

mavrothal wrote:
Right. But you do not want that if you just woofing around.
Also requiring a non-English locale to be in use so will run needs a workaround if it is just to generate the POT files.
Cannot image me just woofing around, really.

Generating a pot file has nothing to do with locales.
If you mean po file msginit is the tool for this and msginit --help helps you to make use of option --locale.

mavrothal wrote:
L18L wrote:
I am referring to people who searched an found help at the forum but never returned any language pack. Exclamation
Confused
Unless you have specific persons in mind that you would expect to act differently for some reason, I think that this is the norm in forums like this one. Translation or otherwise.
The context was not "forums like this one" but
you wrote:
more complicated and efficient approaches for collaborative translations
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 3431
Location: www.eussenheim.de/

PostPosted: Tue 20 Oct 2015, 11:05    Post subject: translation with mdview  

step wrote:
Did I get it right?

No.
Here is how .md files can be translated.

Example: /usr/share/doc/findnrun/

Prepend
Code:
%%textdomain docfindnrun
to files index.md no-help.md LUBUNTU.md and launch
Code:
momanager

Choose 'index .... ' from right-top-combobox and click create.
Edit some messages.
Click OK (or Fix if you made some mistakes)
Click OK
Admire your translations (see image, made just some for demo)
Continue (last edited always at top of left-sire-top-combo box)
Click ........

Forget
Quote:
[A] Instructions for markdown

The set of English markdown source files is located on github here.

Translate all .md files found in the on-line folder.
Pack all translated files into a .tar.gz archive named after your locale code, i.e. markdown[de_DE.UTF-8].tar.gz for German in Germany.
Send me the archive via one of the mechanisms noted above.
I will generate an HTML archive and push it to Github with the expectation that you will test the HTML archive and correct translation and layout issues by submitting new .md files until all issues are closed.

Note on markdown syntax

Avoid being too creative with your markdown syntax. Keep it simple. While the publishing process supports Markdown Extra I recommend that you stick to the much more limited, but effective, markdown syntax that mdview supports. All .md files in this project follow this guideline.


Note, translators translate.
docfindnrun_momanaged.png
 Description   glued with PeasyGlue
 Filesize   157.56 KB
 Viewed   148 Time(s)

docfindnrun_momanaged.png


Last edited by L18L on Tue 20 Oct 2015, 11:55; edited 1 time in total
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 18 of 20 [298 Posts]   Goto page: Previous 1, 2, 3, ..., 16, 17, 18, 19, 20 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects » Localization Project
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.1030s ][ Queries: 14 (0.0105s) ][ GZIP on ]