Dear Samuel,

Thank you very much. I had read the gettext help but it is not as clear as it should, it was not clear for me if the indexed strings were the complete error message including the formatting details or the plain English version within it. Now it is more clear. What is still not cleaer is if the only use of getttext is to localize errore messages or it is possible to localize a GUI without formatting.

Regards,

Federico Miyara



On 04/03/2019 14:29, Samuel Gougeon wrote:
Hello Federico,


Le 04/03/2019 à 05:58, Federico Miyara a écrit :

Dear all,

I'm trying to understand the way the localizing function gettext works. For instance,

setlanguage('es')     // Set Spanish as session language
gettext("%s: Wrong number of input arguments.\n")

produces the expected result:

%s: Número incorrecto de argumentos de entrada.\n

But

gettext("Wrong number of input arguments.")

returns the original English version

Wrong number of input arguments.

Are the elements %s and \n part of the indexed string?

Yes. The string provided to gettext() is an identifier. So changing any single character of it then refers to another message.

You might have already had a look at the gettext page: https://help.scilab.org/docs/6.0.2/en_US/gettext.html


How can I get a list of indexed strings?

The most frequent ones are newly listed in
--> help error_table

https://help.scilab.org/docs/6.0.2/en_US/error_table.html
For an exhaustive list, please

  * Download and unzip the source code :
    https://www.scilab.org/previous-scilab-versions
  * In your OS file browser, from the root directory of the source
    tree, select all *.pot files (roughtly 1 hundred of files)
  * Edit *.pot files. They are unformatted text files. Each one
    gathers all gettext messages identifiers for a native Scilab module.


Hope This Helps

Samuel




_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



---
El software de antivirus Avast ha analizado este correo electrónico en busca de 
virus.
https://www.avast.com/antivirus
_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to