Localize new binning functions in phonetic extension

This commit is contained in:
Antonin Delpeuch 2018-12-31 14:41:33 +01:00
parent 044e372a8f
commit 48b3953d64
4 changed files with 49 additions and 2 deletions

View File

@ -45,6 +45,16 @@ function init() {
// Similarly, we could register new distances like this:
// Packages.com.google.refine.clustering.knn.DistanceFactory.put("my-distance", new Packages.org.openrefine.mydistances.MyDistance());
/*
* Resources: just some javascript to load the localized strings
*/
ClientSideResourceManager.addPaths(
"project/scripts",
module,
[
"scripts/load-language.js",
]
);
}

View File

@ -0,0 +1,4 @@
{
"clustering-keyers/beider-morse": "Beider-Morse",
"clustering-keyers/daitch-mokotoff": "Daitch-Mokotoff"
}

View File

@ -0,0 +1,14 @@
#*
This file contains common velocity macros used in all .vt files.
For Velocity documentation, see:
http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html
*#
#macro( makeAList $list )
<ul>
#foreach($item in $list)
<li>$item</li>
#end
</ul>
#end

View File

@ -0,0 +1,19 @@
// Load the localization file
var dictionary = {};
$.ajax({
url : "command/core/load-language?",
type : "POST",
async : false,
data : {
module : "phonetic",
// lang : lang
},
success : function(data) {
dictionary = data['dictionary'];
lang = data['lang'];
}
});
$.i18n().load(dictionary, lang);