[Libreoffice-commits] online.git: loleaflet/src

Pranav Kant pranavk at collabora.com
Wed Feb 17 08:33:43 UTC 2016


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

New commits:
commit f6baed14c08281c23d70e1908240f74d2af7ce9b
Author: Pranav Kant <pranavk at collabora.com>
Date:   Sun Feb 14 19:00:32 2016 +0530

    loleaflet: Handle outline levels as special case, for l10n
    
    'Outline' is localized, 'Outline x', where x = number, is not.
    Lets treat outline levels as special case so that we could get
    their localized form also.
    
    Change-Id: I96d1a0d715e5859f9d0f2da2c00c06232621555b
    Reviewed-on: https://gerrit.libreoffice.org/22354
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/loleaflet/src/control/Control.Styles.js b/loleaflet/src/control/Control.Styles.js
index b4861ca..0691f4f 100644
--- a/loleaflet/src/control/Control.Styles.js
+++ b/loleaflet/src/control/Control.Styles.js
@@ -79,7 +79,13 @@ L.Control.Styles = L.Control.extend({
 				styles.forEach(function (style) {
 					var item = L.DomUtil.create('option', '', container);
 					item.value = style;
-					item.innerHTML = style.toLocaleString();
+
+					if (style.startsWith('Outline')) {
+						var outlineLevel = style.split('Outline')[1];
+						var localeString = 'Outline'.toLocaleString() + outlineLevel;
+						item.innerHTML = localeString;
+					} else
+						item.innerHTML = style.toLocaleString();
 				});
 			}
 		}


More information about the Libreoffice-commits mailing list