loleaflet/src/control/Control.Menubar.js |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 719da31c4c73679adabaf9b3fb09e07466817bd1
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Mon Jul 22 07:55:23 2019 +0200
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Tue Oct 1 10:43:12 2019 +0200

    Read language ISO code
    
    Change-Id: I4814dab6b87d3fac266bac85a3217aed4e24d1fd
    Reviewed-on: https://gerrit.libreoffice.org/79936
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>
    Tested-by: Szymon Kłos <szymon.k...@collabora.com>

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index 714dd177e..84808c65e 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -517,7 +517,12 @@ L.Control.Menubar = L.Control.extend({
                        var languages  = [];
 
                        e.commandValues.forEach(function(language) {
-                               languages.push({translated: _(language), 
neutral: language});
+                               var split = language.split(';');
+                               language = split[0];
+                               var isoCode = '';
+                               if (split.length > 1)
+                                       isoCode = split[1];
+                               languages.push({translated: _(language), 
neutral: language, iso: isoCode});
                        });
                        languages.sort(function(a, b) {
                                return a.translated < b.translated ? -1 : 
a.translated > b.translated ? 1 : 0;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to