Hi On Wed, May 22, 2013 at 09:45:41PM +0200, FR web forum wrote: > >Do you mean real environment variables that you can export on a terminal > >and affect the program execution? Or these variables that are set at > >build time or internally at runtime? > Sorry, I express myself badly. > Just to clarify sentences translation for Pootle.
For some of those strings there are some generic variables, and in other cases their meaning is defined in a particular piece of code. For the cases you quoted, there is a general procedure to handle them. In Pootle, you may find these variables in strings that come from *.src files, for example https://translate.apache.org/fr/aoo40/translate.html#search=%25FULLPRODUCT&sfields=source,locations cui/source/dialogs.po has the strings in cui/source/about.src The most common variables are: %PRODUCTNAME "OpenOffice" /org.openoffice.Setup/Product/ooName %FULLPRODUCTNAME "Apache OpenOffice" /org.openoffice.Setup/Product/ooFullname %PRODUCTVERSION "4.0.0" /org.openoffice.Setup/Product/ooSetupVersion %ABOUTBOXPRODUCTVERSION "4.0.0" /org.openoffice.Setup/Product/ooSetupVersionAboutBox %OOOVENDOR "Apache Software Foundation" /org.openoffice.Setup/Product/ooVendor The complete list of variables from resource strings that are replaced at runtime is: %PRODUCT %FULLPRODUCT %PRODUCTNAME %FULLPRODUCTNAME %PRODUCTVERSION %ABOUTBOXPRODUCTVERSION %PRODUCTEXTENSION %PRODUCTXMLFILEFORMATNAME %PRODUCTXMLFILEFORMATVERSION %OOOVENDOR %WRITERCOMPATIBILITYVERSIONOOO11 It is taken from desktop/source/app/app.cxx. Desktop::Main() registers void ReplaceStringHookProc( UniString& rStr) at the resource manager (ResMgr::SetReadStringHook( ReplaceStringHookProc );) to perform this replacement. The replacement string is taken from the Office configuration. In the source code, the configuration files have the variables in the form of ${VARIABLE_NAME}, these variables are replaced at build time with strings from variables defined in instsetoo_native/util/openoffice.lst (or passed to ./configure). For strings in user interface elements (toolbars, menubar, statusbar) that are defined in XxxCommands.xcu, only "%PRODUCTNAME" is replaced, this is done in framework::ConfigurationAccess_UICommand::fillInfoFromResult(). But in most cases, it is up to the particular code, to set the variables, for example "Delete %SLIDES slides." in the Presentation Minimizer code, where %SLIDES is to be replaced be the number of slides that will be deleted. Regards -- Ariel Constenla-Haile La Plata, Argentina
pgph5lt9JAzqZ.pgp
Description: PGP signature