From d5450840ad5bda80d5ff6d54d4a8f5475f61c8b5 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 2 Sep 2014 15:30:31 +0200 Subject: [PATCH] expand language codes to language names after adding/editing annotation --- static/js/editor.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/js/editor.js b/static/js/editor.js index 871d3582..08002674 100644 --- a/static/js/editor.js +++ b/static/js/editor.js @@ -141,6 +141,11 @@ pandora.ui.editor = function(data) { result.data.date = Ox.formatDate( result.data.modified.slice(0, 10), '%B %e, %Y' ); + result.data.languages = ( + result.data.languages || [pandora.site.language] + ).map(function(language) { + return Ox.getLanguageNameByCode(language); + }); that.updateAnnotation(data.id, result.data); Ox.Request.clearCache(); };