Code::Blocks Forums
User forums => Help => Topic started by: LETARTARE on January 19, 2012, 04:03:52 pm
-
With C::B, I use 'Poedit' from 'Tools' with the parameter
"$(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 'codeblocks.cbp' -> 'Code::Blocks'
and returns the error Poedit 123 (incorrect syntax)
Do you have a solution?
Thank you in advance
-
What? A better explanation will help us to help you.
-
I'll try ...
'Poedit' looks for the file 'code::blocks.po'
But the symbols '::' are forbidden to name a file.
Should provide 'codeblocks.po'
-
Try a bit harder, I still don't understand what you're trying to achieve and what is the problem.
-
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
'::' Is forbidden to name a file with Vista
-
If the project is called 'Code::Blocks', Poedit not find the file 'Code::Blocks.po' because this file is illegal to write with Win32
'::' 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.
-
Thank you for your answer
Of course.
But I was looking for ...
-
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)
-
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)' !!!
-
I know, that's why I said you have the option to use squirrel scripts.
-
@oBFusCAted
@MortenMacFly
thank you very much
Here's one way to get the name from '$ (PROJECT_FILENAME)', if necessary
"$(PROJECT_DIR)[[print (ReplaceMacros(_T("$(PROJECT_FILENAME)")).BeforeLast(::EXT_CODEBLOCKS) );]]po"