Author Topic: Use C::B->Tools with Poedit  (Read 7044 times)

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Use C::B->Tools with Poedit
« on: January 19, 2012, 04:03:52 pm »
With C::B, I use 'Poedit' from 'Tools' with the parameter
Quote
"$(PROJECT_DIR)$(PROJECT_NAME)"

(the "" allow spaces in macros)

is a project 'project.cbp' and $(PROJECT_NAME) = 'project' and the file 'project.po' in $(PROJECT_DIR)

the call of 'Poedit' load properly 'project.po' with the most part of project
except C:: B.

Indeed, the project name
Quote
'codeblocks.cbp' -> 'Code::Blocks'
and returns the error Poedit 123 (incorrect syntax)

Do you have a solution?

Thank you in advance
CB-13515, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.6
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Use C::B->Tools with Poedit
« Reply #1 on: January 19, 2012, 04:05:19 pm »
What? A better explanation will help us to help you.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: Use C::B->Tools with Poedit
« Reply #2 on: January 19, 2012, 04:13:02 pm »
I'll try ...

'Poedit' looks for the file 'code::blocks.po'
But the symbols '::' are forbidden to name a file.
Should provide 'codeblocks.po'
« Last Edit: January 19, 2012, 04:41:20 pm by LETARTARE »
CB-13515, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.6
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Use C::B->Tools with Poedit
« Reply #3 on: January 19, 2012, 04:42:25 pm »
Try a bit harder, I still don't understand what you're trying to achieve and what is the problem.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: Use C::B->Tools with Poedit
« Reply #4 on: January 19, 2012, 05:06:18 pm »
Thank you for your answers, but the Google translation is not easy ...

I try to open from C::B, a file 'po' corresponding to the active project
If the project is called 'foo', translation file called 'foo.po'
I forgot to mention that I generate this file 'foo.po' from the project name 'foo'
I put it in the project directory

Normally call 'Poedit' (with the parameters of the first post) by the menu 'Tools-> Poedit'  to open 'foo.po' in 'Poedit'

If the project is called 'Code::Blocks', Poedit not find the file 'Code::Blocks.po' because this file is illegal to write with Win32
Quote
'::' Is forbidden to name a file with Vista
CB-13515, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.6
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Use C::B->Tools with Poedit
« Reply #5 on: January 19, 2012, 05:24:01 pm »
If the project is called 'Code::Blocks', Poedit not find the file 'Code::Blocks.po' because this file is illegal to write with Win32
Quote
'::' Is forbidden to name a file with Vista
So why don't you simply rename the project? Is has to match the name of your *.po file anyways - so there is not other solution than that.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: Use C::B->Tools with Poedit
« Reply #6 on: January 19, 2012, 05:29:59 pm »
Thank you for your answer
Of course.
But I was looking for ...
CB-13515, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.6
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Use C::B->Tools with Poedit
« Reply #7 on: January 19, 2012, 05:30:35 pm »
Looking for "$(PROJECT_FILENAME), $(PROJECT_FILE), $(PROJECTFILE) " ?

Another option is to use a full Squirrel script for the expansion. See here http://wiki.codeblocks.org/index.php?title=Variable_expansion (at the bottom of the page)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: Use C::B->Tools with Poedit
« Reply #8 on: January 19, 2012, 05:39:37 pm »
Thanks,
but "$(PROJECT_FILENAME), $(PROJECT_FILE), $(PROJECTFILE) "  will be replaced by 'codeblocks.cbp'
I want 'codeblocks'
I look at your URL
I need a macro like '$ (PROJECT_NAME_LESS_EXT)' !!!
CB-13515, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.6
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Use C::B->Tools with Poedit
« Reply #9 on: January 19, 2012, 05:44:59 pm »
I know, that's why I said you have the option to use squirrel scripts.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: Use C::B->Tools with Poedit
« Reply #10 on: January 20, 2012, 10:40:02 am »
@oBFusCAted
@MortenMacFly
thank you very much

Here's one way to get the name from '$ (PROJECT_FILENAME)', if necessary
Quote
"$(PROJECT_DIR)[[print (ReplaceMacros(_T("$(PROJECT_FILENAME)")).BeforeLast(::EXT_CODEBLOCKS)  );]]po"
CB-13515, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.6
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl