message filter

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

message filter

L18L
Searching a solution for Serbian language (they have 2 charsets: Cyrillic and Latin)  I have found this
-----------------------------------------------------
9.4.5 Built-in filters

The filter ‘recode-sr-latin’ is recognized as a built-in filter. The command ‘recode-sr-latin’ converts Serbian text, written in the Cyrillic script, to the Latin script. The command ‘msgfilter recode-sr-latin’ applies this conversion to the translations of a PO file. Thus, it can be used to convert an sr.po file to an sr@latin.po file.

The filter ‘quot’ is recognized as a built-in filter. The command ‘msgfilter quot’ converts any quotations surrounded by a pair of ‘"’, ‘'’, and ‘`’.

The filter ‘boldquot’ is recognized as a built-in filter. The command ‘msgfilter boldquot’ converts any quotations surrounded by a pair of ‘"’, ‘'’, and ‘`’, also adding the VT100 escape sequences to the text to decorate it as bold.

The use of built-in filters is not sensitive to the current locale’s encoding. Moreover, when used with a built-in filter, ‘msgfilter’ can automatically convert the message catalog to the UTF-8 encoding when needed.
----------------------------------------------------- at
https://www.gnu.org/software/gettext/manual/html_node/msgfilter-Invocation.html

Looks like this tool can
 --  convert cyrillic to latin
 --- create  localized quotes

Hoping that one of these days it will help Griot (I think you can start using default cyrillic only now)
and help all of us with automatically localized quotes.
Here a manually created example for  German quotes :  

msgid "We are \"Puppy Translators Team“ members."
msgstr  "Wir sind Puppy Translators Team“ Mitglieder ."



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: message filter

Bert
Administrator
L18L wrote
Searching a solution for Serbian language (they have 2 charsets: Cyrillic and Latin)  I have found this
-----------------------------------------------------
9.4.5 Built-in filters


Hoping that one of these days it will help Griot (I think you can start using default cyrillic only now)
and help all of us with automatically localized quotes.
Here a manually created example for  German quotes :  

msgid "We are \"Puppy Translators Team“ members."
msgstr  "Wir sind Puppy Translators Team“ Mitglieder ."
Wow, this looks like a breakthrough discovery.
If possible L18L, could you explain "automatically localized quotes"?

Also, in your German example : "We are \"Puppy Translators Team“ members.",
the second double quote is escaped with a "\". So <Puppy Translators Team> becomes a literal quotation, right?
Does it also make the ' " ' just in front of <Puppy Translators Team>in the msgstr tumble down to its unusual position at the bottom of the line height? Or is this the normal German writing style?

It looks like you've found an important solution to an annoying problem for all of us.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: message filter

L18L
Bert wrote
L18L wrote
Searching a solution for Serbian language (they have 2 charsets: Cyrillic and Latin)  I have found this
-----------------------------------------------------
9.4.5 Built-in filters


Hoping that one of these days it will help Griot (I think you can start using default cyrillic only now)
and help all of us with automatically localized quotes.
Here a manually created example for  German quotes :  

msgid "We are \"Puppy Translators Team“ members."
msgstr  "Wir sind Puppy Translators Team“ Mitglieder ."
Wow, this looks like a breakthrough discovery.
If possible L18L, could you explain "automatically localized quotes"?

Also, in your German example : "We are \"Puppy Translators Team“ members.",
the second double quote is escaped with a "\". So <Puppy Translators Team> becomes a literal quotation, right?
Does it also make the ' " ' just in front of <Puppy Translators Team>in the msgstr tumble down to its unusual position at the bottom of the line height? Or is this the normal German writing style?

It looks like you've found an important solution to an annoying problem for all of us.
My example was hand-made and is missing the second escape. Sorry.
Position at the bottom is normal German writing style.

And  I was "sinking" other languages have other quotation  marks.
These infos are stored at /usr/share/i18n/locales/*
(Infos for the actual used locales in /usr/lib/locale/*)

Anyway, looking now (in console):
-----------------------
# cd /usr/share/i18n/locales
# grep QUOTATION *
de_DE:% LEFT DOUBLE QUOTATION MARK
de_DE:% RIGHT DOUBLE QUOTATION MARK
de_DE:% DOUBLE LOW-9 QUOTATION MARK
de_DE:% DOUBLE HIGH-REVERSED-9 QUOTATION MARK
lo_LA:<U0022>    IGNORE;IGNORE;<U0022>;IGNORE    % QUOTATION MARK
th_TH:<U0022>    IGNORE;IGNORE;<U0022>;IGNORE    % QUOTATION MARK
translit_neutral:% LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
translit_neutral:% RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
translit_neutral:% LEFT SINGLE QUOTATION MARK
translit_neutral:% RIGHT SINGLE QUOTATION MARK
translit_neutral:% SINGLE LOW-9 QUOTATION MARK
translit_neutral:% SINGLE HIGH-REVERSED-9 QUOTATION MARK
translit_neutral:% LEFT DOUBLE QUOTATION MARK
translit_neutral:% RIGHT DOUBLE QUOTATION MARK
translit_neutral:% DOUBLE LOW-9 QUOTATION MARK
translit_neutral:% DOUBLE HIGH-REVERSED-9 QUOTATION MARK
translit_neutral:% SINGLE LEFT-POINTING ANGLE QUOTATION MARK
translit_neutral:% SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
translit_wide:<UFF02> <U0022> % FULLWIDTH QUOTATION MARK
uk_UA:% LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
uk_UA:% RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
#
-----------------------
tells us it is only de and uk using special QUOTATION MARKs.
Maybe translit (whatever this might be) also.

A breaktrough discovery for German and Ukrainian only for now.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: message filter

L18L
In reply to this post by L18L
L18L wrote
Looks like this tool can
 --  convert cyrillic to latin

Hoping that one of these days it will help Griot (I think you can start using default cyrillic only now)
Tested and found OK. (not just "sinking")
Tested how?
Tested this way:
Copied Serbian files (sr) from fd64-NLS, see http://puppy-translators-team.40341.n7.nabble.com/fd64-nls-a-helpful-source-of-mo-files-td70.html
and then changed into that sr directory and displayed first 20 lines of parted.po in original cyrillic:
-----------------------------------
cd sr/LC_MESSAGES
msgunfmt parted.mo  | head -n20
msgid ""
msgstr ""
"Project-Id-Version: patred\n"
"Report-Msgid-Bugs-To: bug-parted@gnu.org\n"
"POT-Creation-Date: 2010-02-26 15:19+0100\n"
"PO-Revision-Date: 2009-05-21 23:22+0000\n"
"Last-Translator: turncoat <Unknown>\n"
"Language-Team: Serbian <sr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-22 05:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"

msgid ""
"\n"
"Error: A general SIGFPE signal was encountered."
msgstr ""
"\n"
"Грешка: Наишао сам на генерални SIGFPE сигнал."
#
-----------------------------------
 and then the same 20 lines using msgfilter recoded-sr-latin:
-----------------------------------
msgunfmt parted.mo | msgfilter recode-sr-latin | head -n20
msgid ""
msgstr ""
"Project-Id-Version: patred\n"
"Report-Msgid-Bugs-To: bug-parted@gnu.org\n"
"POT-Creation-Date: 2010-02-26 15:19+0100\n"
"PO-Revision-Date: 2009-05-21 23:22+0000\n"
"Last-Translator: turncoat <Unknown>\n"
"Language-Team: Serbian <sr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-22 05:12+0000\n"
"X-Generator: Launchpad (build Unknown)\n"

msgid ""
"\n"
"Error: A general SIGFPE signal was encountered."
msgstr ""
"\n"
"Greška: Naišao sam na generalni SIGFPE signal."
#
-----------------------------------

You see: msgstr can be converted to sr@latin.
@Griot, use default cyrillic for your work now, later let latin lol.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: message filter

Griot
Hi, L18L.

L18L wrote
You see: msgstr can be converted to sr@latin.
@Griot, use default cyrillic for your work now, later let latin lol.
Thanks for thinking of me.

Sure...
I have to re-read this several times and try to figure out how/what/when/why etc.

Ever since I started using Puppy Linux, I feel like that robot, Johnny No.5, remember?
"Need more input, more input!"

>blue_screen_of_death< >frozen< >hard_reset_needed<

P.S. PM sent.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: message filter

L18L
Griot wrote
 try to figure out how/what/when/why etc.
how: see above
when: not now
why: you want sr@latin, it can be created automatically in the end.
I will help you (if you start creating something in cyrillic, maybe start with quicksetup? )

Griot wrote
P.S. PM sent.
How? When? Where?  
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: message filter

Griot
Ok, thanks.
PM via this forum. I guess it's going to land on your subscribed address.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: message filter

L18L
Griot wrote
Ok, thanks.
PM via this forum. I guess it's going to land on your subscribed address.
Your guess was right!
My answer was sent back from my  subscribed address, hope you got it.

Additionally on murga forum because
- might be of general interest (for other keyboards!)
- Screenshot
http://murga-linux.com/puppy/viewtopic.php?t=98080

Please report success or no success for you, here or there or per PM  (I do login not very often).

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: message filter

Griot
Hello, folks.

Yep, it works. Again, thanks to L18L for being patient against all odds.
(Who said Griot?)  

Though, your kung foo is better, L18L.
I couldn't make it with Cyrillic letters within terminal, but it's not essential at the moment.

Here's a screeny of my settings in Xorg.conf. I'll post this on Puppy forum, too.

xorg.conf-serbian

Hopefully, I'll get my hands dirty during next week. Beware, you .po's & .mo's!!!
ATM I'm looking for a new job. <cold-shower>
XXI century delight.

I'll be back....

Cheers, Puppians!

Loading...