Christian Buhtz | 5 Apr 2006 18:03
Picon

[poedit-users] how to scan source-files?

I am new with poEdit and i18n.
I created a project with poEdit.
I have C++ sources with _("strings") in it.

How can I scan this sources with poEdit to translate them?

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
Werner F. Bruhin | 5 Apr 2006 19:13
Picon
Favicon

Re: [poedit-users] how to scan source-files?

Hi Christian,

Christian Buhtz wrote:

>I am new with poEdit and i18n.
>I created a project with poEdit.
>I have C++ sources with _("strings") in it.
>
>How can I scan this sources with poEdit to translate them?
>  
>
Open your poedit catalog and under the menu Catalog/Settings on the tab 
path enter e.g.

- c:\dev    - this is your base dev. path
- create one or more entries below it with relative path to your 
application(s)
yourapp\program
yourapp\tools

After that click on the icon "Update catalog" - little wheel, third from 
the left

Hope this helps
Werner

>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by xPML, a groundbreaking scripting language
(Continue reading)

Christian Buhtz | 6 Apr 2006 00:34
Picon

Re: [poedit-users] how to scan source-files?

On Wed, 05 Apr 2006 19:13:24 +0200, Werner F. Bruhin wrote:
> After that click on the icon "Update catalog" - little wheel, third from 
> the left

Oh thanks. No there is a "parse C++ files" progress bar.
But after that there are no entries.

How can I found out which files are parsed?

Why does poEdit does not find my _("strings") ?

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
Werner F. Bruhin | 6 Apr 2006 10:04
Picon
Favicon

Re: [poedit-users] how to scan source-files?

Hi,

Christian Buhtz wrote:

>On Wed, 05 Apr 2006 19:13:24 +0200, Werner F. Bruhin wrote:
>  
>
>>After that click on the icon "Update catalog" - little wheel, third from 
>>the left
>>    
>>
>
>Oh thanks. No there is a "parse C++ files" progress bar.
>But after that there are no entries.
>
>How can I found out which files are parsed?
>
>Why does poEdit does not find my _("strings") ?
>  
>
I don't know.  Did you check under File/Preferences Parser tab, I don't 
use C++ (use Python) but even in my poedit install the C++ parser is 
defined.

Please re-check your path settings, I recall when I started with poedit 
that I had a bit of a problem to get it going as my path settings were 
not correct.

Hope this helps
Werner
(Continue reading)

Christian Buhtz | 6 Apr 2006 11:03
Picon

Re: [poedit-users] how to scan source-files?

On Thu, 06 Apr 2006 10:04:53 +0200, Werner F. Bruhin wrote:
> I don't know.  Did you check under File/Preferences Parser tab, I don't 
> use C++ (use Python) but even in my poedit install the C++ parser is 
> defined.

C++ parser is there but I think he do not know for what he should parse.
I thougt that the '_' is standard. But I have to put it in the keyword
list. Now there are strings.

Other question.
I can only make one translation in one po-file. Do I have one po-file
for each language I want to support?

I think it would be easier if there are all in one file.

If the code changes I have to reparse it with each po-file? If there are
20 languages. I have to open each po-file and parse the code?

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
Werner F. Bruhin | 6 Apr 2006 14:54
Picon
Favicon

Re: [poedit-users] how to scan source-files?

Hi Christian,

Christian Buhtz wrote:

>On Thu, 06 Apr 2006 10:04:53 +0200, Werner F. Bruhin wrote:
>  
>
>>I don't know.  Did you check under File/Preferences Parser tab, I don't 
>>use C++ (use Python) but even in my poedit install the C++ parser is 
>>defined.
>>    
>>
>
>C++ parser is there but I think he do not know for what he should parse.
>I thougt that the '_' is standard. But I have to put it in the keyword
>list. Now there are strings.
>  
>
Strange I use _('to translate') in Python and it finds it.  Maybe some 
expert can enlighten us.

>Other question.
>I can only make one translation in one po-file. Do I have one po-file
>for each language I want to support?
>  
>
Yeap, one file per language.  This is the way gettext works, i.e. when 
you distribute you have to put the .mo files in folders such as:

locale\de\LC_MESSAGES
(Continue reading)

Christian Buhtz | 9 Apr 2006 03:03
Picon

[poedit-users] more than one cataloge?

What could be the reason to use more than one catalog (cat1.mo, cat2.mo,
..) for one language?

There is a wxLocal::AddCataloge() methode in wxWidgets.

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
Christian Buhtz | 9 Apr 2006 05:26
Picon

[poedit-users] getting started

Now I got this directory structure with files

../OctopusBackup (that is the working dir!)
../OctopusBackup/locales/de/ob.mo
../OctopusBackup/locales/de/ob.po
../OctopusBackup/locales/fr/ob.mo
../OctopusBackup/locales/fr/ob.po

That is my code with wxWidgest.
<code>
bool OBApp::OnInit()
{
    static const wxLanguage langIds[] =
    {
        wxLANGUAGE_DEFAULT,
        wxLANGUAGE_FRENCH,
        wxLANGUAGE_GERMAN,
        wxLANGUAGE_ENGLISH
    };

    locale_.AddCatalogLookupPathPrefix(_T("locales"));
    locale_.AddCatalog(_T("ob"));
    locale_.Init(langIds[1]);

    pMainFrame_ = new OBMainFrame( _(_T("Hello World")), wxPoint(50,50),
wxSize(450,340), this );

    pMainFrame_->AddMessage("OB started...");
    pMainFrame_->AddMessage(core_.GetCurrentDateString());

(Continue reading)

Werner F. Bruhin | 9 Apr 2006 10:38
Picon
Favicon

Re: [poedit-users] getting started

Hi Christian,

I am no good in C++ but as I use wxPython (a Python wrapper of wxWidget) 
I might have some pointers for you.

Christian Buhtz wrote:

>Now I got this directory structure with files
>
>../OctopusBackup (that is the working dir!)
>../OctopusBackup/locales/de/ob.mo
>../OctopusBackup/locales/de/ob.po
>../OctopusBackup/locales/fr/ob.mo
>../OctopusBackup/locales/fr/ob.po
>  
>
You are aware that you only need to distribute the .mo?  You might also 
want to change "locales" to "locale" which seems to be the standard 
used, but then this is nitpicking :-) .

>
>That is my code with wxWidgest.
><code>
>bool OBApp::OnInit()
>{
>    static const wxLanguage langIds[] =
>    {
>        wxLANGUAGE_DEFAULT,
>        wxLANGUAGE_FRENCH,
>        wxLANGUAGE_GERMAN,
(Continue reading)

Werner F. Bruhin | 9 Apr 2006 10:46
Picon
Favicon

Re: [poedit-users] more than one cataloge?

Hi Christian,

Christian Buhtz wrote:

>What could be the reason to use more than one catalog (cat1.mo, cat2.mo,
>..) for one language?
>
>There is a wxLocal::AddCataloge() methode in wxWidgets.
>  
>
The way I understand it is that the catalog is per application.  So by 
default the wx  catalog is in there, then you do "AddCatalog('yourapp')" 
and possibly "AddCatalog('yourappN')", e.g. in my app I could have split 
the wine cellar book texts into one catalog and the recipe book text 
into another and then I could generate three exe's, one for each book 
and a combined one, in the combined one I would need to load both catalogs.

See you
Werner

>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by xPML, a groundbreaking scripting language
>that extends applications into web and mobile media. Attend the live webcast
>and join the prime developer group breaking into this new coding territory!
>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
>_______________________________________________
>Poedit-users mailing list
>Poedit-users@...
(Continue reading)


Gmane