Remove old _tkeys_ code

This was used for debugging translations, it would replace each string with
the translation key, so people could see what key was used where in the UI.
As far as I know, nobody was using this.
This commit is contained in:
Bryan Housel
2020-02-21 17:05:55 -05:00
parent 217ce4b33f
commit a43a7f8b50
+3 -30
View File
@@ -29,27 +29,6 @@ export function coreContext() {
context.version = '2.17.2';
context.privacyVersion = '20191217';
// // create a special translation that contains the keys in place of the strings
// let tkeys = JSON.parse(JSON.stringify(dataEn)); // clone deep
// let parents = [];
// function traverser(v, k, obj) {
// parents.push(k);
// if (typeof v === 'object') {
// forOwn(v, traverser);
// } else if (typeof v === 'string') {
// obj[k] = parents.join('.');
// }
// parents.pop();
// }
// function forOwn(obj, fn) {
// Object.keys(obj).forEach(k => fn(obj[k], k, obj));
// }
// forOwn(tkeys, traverser);
// addLocale('_tkeys_', tkeys);
// https://github.com/openstreetmap/iD/issues/772
// http://mathiasbynens.be/notes/localstorage-pattern#comment-9
@@ -206,17 +185,11 @@ export function coreContext() {
};
context.maxCharsForTagKey = function() {
return 255;
};
context.maxCharsForTagKey = () => 255;
context.maxCharsForTagValue = function() {
return 255;
};
context.maxCharsForTagValue = () => 255;
context.maxCharsForRelationRole = function() {
return 255;
};
context.maxCharsForRelationRole = () => 255;
/* History */