Author |
Message |
L18L
Joined: 19 Jun 2010 Posts: 3431 Location: www.eussenheim.de/
|
Posted: Tue 09 Oct 2012, 11:01 Post subject:
HOWTO find typo in mo file [SOLVED] Subject description: build in forked fast momanager now |
|
[update 2013-6-04]build in forked fast momanager now, thus marked SOLVED[update]
Exemple from own experience:
Translation contained a mistyped word: entsprevhende
which should be. entsprechende
It is anywhere in one of the many petget__ mo files.
Using momanager only to search for the location of this mistyped word
But the following code (2 lines) has detected the affected file petget___downloadpkgs.sh.mo
# cd /usr/share/locale/${LANG%_*}/LC_MESSAGES
# for f in `ls petget*`; do echo $f;msgunfmt $f | grep entsprevh ;done
----
edited 2913-03-07:
I have scripted something usefu:
my /root/my-applications/find_in_mo wrote: | #!/bin/sh
#20130307 L18L find text in .mo files
#
. gettext.sh # need this for eval_gettext amd eval_ngettext
export TEXTDOMAIN=find_in_mo # for momanager
TEXTDOMAINDIR=/usr/share/locale
myLANG=${LANG%_*}
read -p "$(eval_gettext 'pattern to search for in all $TEXTDOMAINDIR/${myLANG}/LC_MESSAGES/*mo files? ')" p
echo
cd $TEXTDOMAINDIR/$myLANG
num_files=0
for f in `ls LC_MESSAGES/*.mo`
do
msgunfmt $f > dummy
if [ "`grep "$p" dummy`" ]
then
num_files=$(( $num_files + 1 ))
echo "${f#*/}";grep -n "$p" dummy;echo
fi
done
eval_ngettext 'Search pattern "$p" was found in $num_files file.' \
'Search pattern "$p" was found in $num_files files.' num_files
echo
cd - >/dev/null
# end |
example "find Barry Kauler":
Quote: | # ./find_in_mo
Textmuster, nach dem in allen Dateinen /usr/share/locale/de/LC_MESSAGES/*mo gesucht werden soll? Barry Kauler
bcrypt_gui_help.mo
47:"Bcrypt_gui based on Pcrypt, by Barry Kauler, April 2009.\n"
83:"Bcrypt_gui basiert auf Pcrypt, von Barry Kauler, April 2009.\n"
connectwizard_2nd.mo
80:"The Network Wizard was originally developed by Barry Kauler, with "
msgunfmt: file "LC_MESSAGES/jwm.mo" is truncated
read-mo.c:240: internationalized messages should not contain the `\v' escape sequence
read-mo.c:240: internationalized messages should not contain the `\v' escape sequence
msgunfmt: file "LC_MESSAGES/net-setup.mo" is not in GNU .mo format
msgunfmt: file "LC_MESSAGES/pcdripper.mo" is not in GNU .mo format
pupdial_init_hotpluggable.mo
484:"Welcome to PupDial, written by Barry Kauler, with\n"
490:"Willkommen bei PupDial, geschrieben von Barry Kauler, mit\n"
497:"Welcome to PupDial, written by Barry Kauler, with\n"
508:"Willkommen bei PupDial, geschrieben von Barry Kauler, mit\n"
pupdial.mo
222:"Welcome to PupDial, written by Barry Kauler, with\n"
228:"Willkommen bei PupDial, geschrieben von Barry Kauler, mit\n"
235:"Welcome to PupDial, written by Barry Kauler, with\n"
246:"Willkommen bei PupDial, geschrieben von Barry Kauler, mit\n"
remasterpup2x.mo
25:"(If this program has missed something important, let me know -- Barry Kauler)"
28:"Barry Kauler)"
39:"should be burnt into /root on the CD, please let me know -- Barry Kauler)"
42:"CD gebrannt werden sollte, will ich das wissen -- Barry Kauler)"
xdelta_gui.mo
98:"Tridgell and Paul Mackerras. The GUI is written by Barry Kauler. Licence is "
118:"Mackerras. Dieses Grafische Benutzerprogramm ist von Barry Kauler "
Textmuster "Barry Kauler" wurde in 6 Dateien gefunden
# |
end of edited 2013-03-07
--------------------------------------------------
petget___check_deps.sh.mo
petget___configure.sh.mo
petget___dependencies.sh.mo
petget___downloadpkgs.sh.mo
"...schau in die entsprevhende Kategorie im Menü (unten-links am Bildschirm) "
petget___fetchinfo.sh.mo
petget___filterpkgs.sh.mo
petget___findnames.sh.mo
petget___installpkg.sh.mo
petget___installpreview.sh.mo
petget___petget.mo
petget___pkg_chooser.sh.mo
petget___removepreview.sh.mo
petget___ui_Classic.mo
petget___ui_Ziggy.mo
petget___versiondiffs.mo
#
Hope this helps other translators
Last edited by L18L on Tue 04 Jun 2013, 11:45; edited 4 times in total
|
Back to top
|
|
 |
musher0

Joined: 04 Jan 2009 Posts: 12095 Location: Gatineau (Qc), Canada
|
Posted: Sat 13 Oct 2012, 01:37 Post subject:
|
|
Hi, L18L.
Thanks for the tip. Might come in handy!
Have a great day!
_________________ musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 3431 Location: www.eussenheim.de/
|
Posted: Tue 16 Oct 2012, 09:06 Post subject:
HOWTO find typo in mo file Subject description: or something that is different in Canadian french |
|
Hi musher0,
musher0 wrote: | ...Might come in handy! |
Yes, not only for typos
I am still waiting to see a langpack_fr_CA-2012.....
|
Back to top
|
|
 |
musher0

Joined: 04 Jan 2009 Posts: 12095 Location: Gatineau (Qc), Canada
|
Posted: Wed 17 Oct 2012, 14:37 Post subject:
|
|
Funny guy!
It's a nice feeling knowing that someone is waiting for something of yours! Thanks for the morale booser!
Don't bet on it, however ! As I believe I mentioned to you on another thread, there is not a lot of difference in computer vocabulary between fr_CA and fr_FR in Puppy. I, for one, am quite happy with the French localization that esmourguit provided in the Spring. I suppose other French-Canadians Puppyists are too.
Besides, see the motto below... Why do something twice, when other things in Puppy require attention. Sorting out the classification mess in the *.desktop files, for example. Or finding a way to provide localizations -- which exist already -- for the utilities in /bin.
Just my 2 cents. All the best in your entreprises!
Musher0
_________________ musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 3431 Location: www.eussenheim.de/
|
Posted: Thu 18 Oct 2012, 08:50 Post subject:
HOWTO find typo in mo file Subject description: or something that is different in Canadian french |
|
musher0 wrote: | It's a nice feeling knowing that someone is waiting for something of yours! |
Sorry, I am not really waiting for a fr_CA version.
musher0 wrote: | As I believe I mentioned to you on another thread, there is not a lot of difference in computer vocabulary between fr_CA and fr_FR in Puppy. |
Nobody says that a fr_CA has to include more than just the different words/phrases.
So there would be nothing to be done twice.
Why don't you just do it? It is not a lot (your words).
|
Back to top
|
|
 |
musher0

Joined: 04 Jan 2009 Posts: 12095 Location: Gatineau (Qc), Canada
|
Posted: Thu 18 Oct 2012, 23:15 Post subject:
|
|
Hi.
I decided to "go to the people". Please see:
http://murga-linux.com/puppy/viewtopic.php?t=81601
The French-Canadians users will tell us if there's a need or not.
Sincerely,
musher0
_________________ musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 3431 Location: www.eussenheim.de/
|
Posted: Fri 23 Nov 2012, 06:13 Post subject:
|
|
Ah bon, je comprends
alors reste la d'autres "chats" à fouetter
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 3431 Location: www.eussenheim.de/
|
Posted: Thu 07 Mar 2013, 10:57 Post subject:
HOWTO find typo in mo file |
|
I have scripted (and translated and tested) a script which can help find text strings in the translations.
See 1st post please.
..... and here is a link for internationalizing developers:
http://forum.slitaz.org/topic/i18n-rules-tips-tricks
|
Back to top
|
|
 |
rodin.s
Joined: 22 Sep 2010 Posts: 340 Location: Ukraine
|
Posted: Thu 07 Mar 2013, 13:17 Post subject:
i18n link and scripts update |
|
Interesting link. I have learned something new although I have some experience with gettext.
A bit offtopic but I was thinking about script that finds updated scripts. When script is updated mo-file sometimes should be updated too, if translation is changed. I was thinking about script that should compare date of a script a date of corresponding mo-file and if script is newer than mo-file then in should be in the list of updated scripts.
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 3431 Location: www.eussenheim.de/
|
Posted: Fri 08 Mar 2013, 14:10 Post subject:
Re: i18n link and scripts update |
|
rodin.s wrote: | ... I was thinking about script that should compare date of a script a date of corresponding mo-file and if script is newer than mo-file then in should be in the list of updated scripts. |
I like this idea.
Other ideas:
grep '#fuzzy' *.po ->have to be checked
tail -n3 | grep -E '^#' -> could be deleted
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 3431 Location: www.eussenheim.de/
|
Posted: Tue 04 Jun 2013, 11:47 Post subject:
HOWTO find typo in mo file [SOLVED] Subject description: use forked fast momanager |
|
build in forked fast momanager now, thus marked SOLVED
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 3431 Location: www.eussenheim.de/
|
Posted: Wed 05 Jun 2013, 13:17 Post subject:
Re: i18n link and scripts update Subject description: ...done |
|
rodin.s wrote: | Interesting link. I have learned something new although I have some experience with gettext.
A bit offtopic but I was thinking about script that finds updated scripts. When script is updated mo-file sometimes should be updated too, if translation is changed. I was thinking about script that should compare date of a script a date of corresponding mo-file and if script is newer than mo-file then in should be in the list of updated scripts. |
...done
in forked fast momanager-20130605
thank you again for this brilliant idea of you
|
Back to top
|
|
 |
|