22 lines
327 B
JavaScript
22 lines
327 B
JavaScript
|
|
/**
|
||
|
|
* @provides phabricator-phtize
|
||
|
|
* @requires javelin-util
|
||
|
|
* @javelin
|
||
|
|
*/
|
||
|
|
|
||
|
|
JX.phtize = function(config) {
|
||
|
|
|
||
|
|
return function(text) {
|
||
|
|
if (!(text in config)) {
|
||
|
|
if (__DEV__) {
|
||
|
|
JX.$E('pht("' + text + '"): translation was not configured.');
|
||
|
|
}
|
||
|
|
|
||
|
|
return text;
|
||
|
|
}
|
||
|
|
|
||
|
|
return config[text];
|
||
|
|
};
|
||
|
|
|
||
|
|
};
|