From a43a7f8b504b3505c5828634cb56216c4d298486 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Fri, 21 Feb 2020 17:05:55 -0500 Subject: [PATCH] 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. --- modules/core/context.js | 33 +++------------------------------ 1 file changed, 3 insertions(+), 30 deletions(-) diff --git a/modules/core/context.js b/modules/core/context.js index a465bc62f..1c041b223 100644 --- a/modules/core/context.js +++ b/modules/core/context.js @@ -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 */