-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added i18n for help (Python Console)
- Loading branch information
Showing
10 changed files
with
161 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
FILE(GLOB HTML_FILES *.htm) | ||
FILE(GLOB I18N_FILES i18n/*.properties) | ||
FILE(GLOB JS_FILES js/*.js) | ||
|
||
INSTALL(FILES ${HTML_FILES} DESTINATION ${QGIS_PYTHON_DIR}/helpConsole) | ||
INSTALL(FILES ${I18N_FILES} DESTINATION ${QGIS_PYTHON_DIR}/helpConsole/i18n) | ||
INSTALL(FILES ${JS_FILES} DESTINATION ${QGIS_PYTHON_DIR}/helpConsole/js) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
You can contribute at translate this help by creating an file *.properties named like | ||
*.ts files (only the locale suffix) which found in Quantum-GIS\i18n directory. | ||
For example: for Italian translation copy and paste a *.properties file and rename it to "it.js". | ||
The only thing what you have to do is translate the values of the keys in dictionary. | ||
|
||
i18n_dict = { | ||
"key" : "value" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
i18n_dict = { | ||
"header.title" : "Python Console for QGIS", | ||
"header.subject" : "Python Console based on PyQScintilla2. (Developed by Salvatore Larosa)", | ||
"header.subject.main" : "To access Quantum GIS environment from this console \ | ||
use qgis.utils.iface object (instance of QgisInterface class). \ | ||
To import the class QgisInterface can also use the dedicated \ | ||
button on the toolbar on the left.", | ||
"features" : "Features", | ||
"features.title" : "Auto-completion and highlighting syntax for the following APIs:", | ||
"features.a" : "CTRL+SPACE to view the auto-completion list.", | ||
"features.b" : "CTRL+ALT+SPACE to view the command history list.", | ||
"features.c" : "Saves the command history by typing '_save' or closing the widget. \ | ||
This command saves the history command in the file ~/.qgis/console_history.txt", | ||
"features.d" : "Clears the command history by typing '_clear'. \ | ||
This command clears the command history from file ~/.qgis/console_history.txt", | ||
"features.e" : "Clears completely command history by typing '_clearAll'. \ | ||
This command clears completely the command history. It has an irreversible effect.", | ||
"toolbar" : "Toolbar", | ||
"toolbar.title" : "The following is a description of the tools in the toolbar:", | ||
"toolbar.clear" : "Tool to clear python console", | ||
"toolbar.iface" : "Tool to import iface class", | ||
"toolbar.sextante" : "Tool to import Sextante class", | ||
"toolbar.script.open" : "Tool to open a python script and load in console", | ||
"toolbar.script.save" : "Tool to save a python script", | ||
"toolbar.help" : "Help", | ||
"toolbar.run" : "Run command (like Enter key pressed)", | ||
"thanks" : "Acknowledgments", | ||
"thanks.text" : "Thanks to Larry Shaffer who provided the API files." | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
i18n_dict = { | ||
"header.title" : "Console Python per QGIS", | ||
"header.subject" : "Console Python basata su PyQScintilla2. (Sviluppata da Salvatore Larosa)", | ||
"header.subject.main" : "Per accedere all'ambiente Quantum GIS da questa console \ | ||
usa l'oggetto qgis.utils.iface (istanza della classe QgisInterface). \ | ||
Per importare la classe QgisInterface puoi usare anche il bottone dedicato che si trova \ | ||
sulla toolbar.", | ||
"features" : "Funzionalità", | ||
"features.title" : "Completamento automatico ed evidenziazione della sintassi per le seguenti APIs:", | ||
"features.a" : "CTRL+SPACE per visualizzare la lista per l'autocompletamento di classi e metodi.", | ||
"features.b" : "CTRL+ALT+SPACE per visualizzare la lista della cronologia dei comandi.", | ||
"features.c" : "Possibilità di salvare la cronologia dei comandi digitando '_save' o semplicemente chiudendo il widget. \ | ||
La cronologia verrà salvata all'interno del file ~/.qgis/console_history.txt", | ||
"features.d" : "Possibilità di cancellare la storia dei comandi digitando '_clear'. \ | ||
La cronologia verrà cancellata dal file ~/.qgis/console_history.txt", | ||
"features.e" : "Possibilità di cancellare completamente la cronologia dei comandi digitando '_clearAll'. \ | ||
La cronologia verrà cancellata sia dal file che dalla memoria temporanea.", | ||
"toolbar" : "Toolbar", | ||
"toolbar.title" : "Di seguito la descrizione dei comandi disponibile nella toolbar:", | ||
"toolbar.clear" : "Strumento per pulire la console", | ||
"toolbar.iface" : "Strumento per importare la classe iface, per accedere all'ambiente QGIS", | ||
"toolbar.sextante" : "Strumento per importare la classe Sextante", | ||
"toolbar.script.open" : "Strumento per aprire un script python da eseguire in console", | ||
"toolbar.script.save" : "Strumento per salvare uno script python sul disco", | ||
"toolbar.help" : "Aiuto", | ||
"toolbar.run" : "Esegui comando (simile al tasto <Invio>)", | ||
"thanks" : "Ringraziamenti", | ||
"thanks.text" : "Grazie a Larry Shaffer per aver fornito i file con le API." | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
$.i18n.setDictionary(i18n_dict); | ||
|
||
$('h2#headerTitle').text($.i18n._('header.title')); | ||
$('span#headerSubject').text($.i18n._('header.subject')); | ||
$('span#headerSubjectMain').text($.i18n._('header.subject.main')); | ||
$('h4#features').text($.i18n._('features')); | ||
$('span#featuresTitle').text($.i18n._('features.title')); | ||
$('span#featuresA').text($.i18n._('features.a')); | ||
$('span#featuresB').text($.i18n._('features.b')); | ||
$('span#featuresC').text($.i18n._('features.c')); | ||
$('span#featuresD').text($.i18n._('features.d')); | ||
$('span#featuresE').text($.i18n._('features.e')); | ||
$('h4#toolbar').text($.i18n._('toolbar')); | ||
$('span#toolbarTitle').text($.i18n._('toolbar.title')); | ||
$('span#toolbarClear').text($.i18n._('toolbar.clear')); | ||
$('span#toolbarIfaceClass').text($.i18n._('toolbar.iface')); | ||
$('span#toolbarSextClass').text($.i18n._('toolbar.sextante')); | ||
$('span#toolbarScriptOpen').text($.i18n._('toolbar.script.open')); | ||
$('span#toolbarScriptSave').text($.i18n._('toolbar.script.save')); | ||
$('span#toolbarHelp').text($.i18n._('toolbar.help')); | ||
$('span#toolbarRun').text($.i18n._('toolbar.run')); | ||
$('h4#thanks').text($.i18n._('thanks')); | ||
$('span#thanksText').text($.i18n._('thanks.text')); |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* | ||
* jQuery i18n plugin | ||
* @requires jQuery v1.1 or later | ||
* | ||
* See http://recursive-design.com/projects/jquery-i18n/ | ||
* | ||
* Licensed under the MIT license: | ||
* http://www.opensource.org/licenses/mit-license.php | ||
* | ||
* Version: 0.9.2 (201204070102) | ||
*/ | ||
(function(f){f.i18n={dict:null,setDictionary:function(a){this.dict=a},_:function(a,b){var d=a;if(this.dict&&this.dict[a])d=this.dict[a];return this.printf(d,b)},toEntity:function(a){for(var b="",d=0;d<a.length;d++)b+=a.charCodeAt(d)>128?"&#"+a.charCodeAt(d)+";":a.charAt(d);return b},stripStr:function(a){return a.replace(/^\s*/,"").replace(/\s*$/,"")},stripStrML:function(a){a=a.split("\n");for(var b=0;b<a.length;b++)a[b]=stripStr(a[b]);return stripStr(a.join(" "))},printf:function(a,b){if(!b)return a; | ||
for(var d="",e=/%(\d+)\$s/g;result=e.exec(a);){var c=parseInt(result[1],10)-1;a=a.replace("%"+result[1]+"$s",b[c]);b.splice(c,1)}e=a.split("%s");if(e.length>1)for(c=0;c<b.length;c++){if(e[c].lastIndexOf("%")==e[c].length-1&&c!=b.length-1)e[c]+="s"+e.splice(c+1,1)[0];d+=e[c]+b[c]}return d+e[e.length-1]}};f.fn._t=function(a,b){return f(this).text(f.i18n._(a,b))}})(jQuery); |