Localize new binning functions in phonetic extension
This commit is contained in:
parent
044e372a8f
commit
48b3953d64
@ -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",
|
||||
]
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
4
extensions/phonetic/module/langs/translation-en.json
Normal file
4
extensions/phonetic/module/langs/translation-en.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"clustering-keyers/beider-morse": "Beider-Morse",
|
||||
"clustering-keyers/daitch-mokotoff": "Daitch-Mokotoff"
|
||||
}
|
14
extensions/phonetic/module/macros.vm
Normal file
14
extensions/phonetic/module/macros.vm
Normal 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
|
19
extensions/phonetic/module/scripts/load-language.js
Normal file
19
extensions/phonetic/module/scripts/load-language.js
Normal 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);
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user