diff --git a/package/gluon-config-mode-geo-location/Makefile b/package/gluon-config-mode-geo-location/Makefile index f7840b7e..39d47bc2 100644 --- a/package/gluon-config-mode-geo-location/Makefile +++ b/package/gluon-config-mode-geo-location/Makefile @@ -23,34 +23,54 @@ define Build/Configure $(INSTALL_DIR) $(PKG_BUILD_DIR)/gluon-config-mode-geo-location{,-with-map}/{luasrc/lib/gluon/config-mode/wizard/,i18n/} endef +define GluonBuildI18N + mkdir -p $(1) + for lang in $$(GLUON_ENABLED_LANGS); do \ + if [ -e $(1)/$$$$lang.po ]; then \ + rm -f $(1)/$$$$lang.lmo; \ + po2lmo $(1)/$$$$lang.po $(1)/$$$$lang.lmo; \ + fi; \ + done +endef + +define GluonInstallI18N + $(INSTALL_DIR) $(1)/lib/gluon/web/i18n + for lang in $$(GLUON_ENABLED_LANGS); do \ + if [ -e $(2)/i18n/$$$$lang.lmo ]; then \ + $(INSTALL_DATA) $(2)/i18n/$$$$lang.lmo $(1)/lib/gluon/web/i18n/$(PKG_NAME).$$$$lang.lmo; \ + fi; \ + done +endef + + define Build/Compile $(CC) -E -x c -P $(PKG_BUILD_DIR)/0400-geo-location.lua.in -o $(PKG_BUILD_DIR)/gluon-config-mode-geo-location/luasrc/lib/gluon/config-mode/wizard/0400-geo-location.lua $(CC) -E -x c -P $(PKG_BUILD_DIR)/gluon-config-mode-geo-location.pot.in -o $(PKG_BUILD_DIR)/gluon-config-mode-geo-location/i18n/gluon-config-mode-geo-location.pot $(CC) -E -x c -P $(PKG_BUILD_DIR)/check_site.lua.in -o $(PKG_BUILD_DIR)/gluon-config-mode-geo-location/check_site.lua $(CC) -E -x c -P $(PKG_BUILD_DIR)/de.po.in -o $(PKG_BUILD_DIR)/gluon-config-mode-geo-location/i18n/de.po $(CC) -E -x c -P $(PKG_BUILD_DIR)/fr.po.in -o $(PKG_BUILD_DIR)/gluon-config-mode-geo-location/i18n/fr.po - $(call GluonBuildI18N,gluon-config-mode-geo-location,$(PKG_BUILD_DIR)/gluon-config-mode-geo-location/i18n) $(call GluonSrcDiet,$(PKG_BUILD_DIR)/gluon-config-mode-geo-location/luasrc,$(PKG_BUILD_DIR)/gluon-config-mode-geo-location/luadest/) + $(call GluonBuildI18N,$(PKG_BUILD_DIR)/gluon-config-mode-geo-location/i18n) $(CC) -DWITHMAP -E -x c -P $(PKG_BUILD_DIR)/0400-geo-location.lua.in -o $(PKG_BUILD_DIR)/gluon-config-mode-geo-location-with-map/luasrc/lib/gluon/config-mode/wizard/0400-geo-location.lua $(CC) -DWITHMAP -E -x c -P $(PKG_BUILD_DIR)/gluon-config-mode-geo-location.pot.in -o $(PKG_BUILD_DIR)/gluon-config-mode-geo-location-with-map/i18n/gluon-config-mode-geo-location-with-map.pot $(CC) -DWITHMAP -E -x c -P $(PKG_BUILD_DIR)/check_site.lua.in -o $(PKG_BUILD_DIR)/gluon-config-mode-geo-location-with-map/check_site.lua $(CC) -DWITHMAP -E -x c -P $(PKG_BUILD_DIR)/de.po.in -o $(PKG_BUILD_DIR)/gluon-config-mode-geo-location-with-map/i18n/de.po $(CC) -DWITHMAP -E -x c -P $(PKG_BUILD_DIR)/fr.po.in -o $(PKG_BUILD_DIR)/gluon-config-mode-geo-location-with-map/i18n/fr.po - $(call GluonBuildI18N,gluon-config-mode-geo-location-with-map,$(PKG_BUILD_DIR)/gluon-config-mode-geo-location-with-map/i18n) $(call GluonSrcDiet,$(PKG_BUILD_DIR)/gluon-config-mode-geo-location-with-map/luasrc,$(PKG_BUILD_DIR)/gluon-config-mode-geo-location-with-map/luadest/) + $(call GluonBuildI18N,$(PKG_BUILD_DIR)/gluon-config-mode-geo-location-with-map/i18n) endef define Package/gluon-config-mode-geo-location/install $(CP) $(PKG_BUILD_DIR)/gluon-config-mode-geo-location/luadest/* $(1)/ - $(call GluonInstallI18N,gluon-config-mode-geo-location,$(1)) + $(call GluonInstallI18N,$(1),$(PKG_BUILD_DIR)/gluon-config-mode-geo-location) endef define Package/gluon-config-mode-geo-location-with-map/install $(CP) $(PKG_BUILD_DIR)/gluon-config-mode-geo-location-with-map/luadest/* $(1)/ $(INSTALL_DIR) $(1)/lib/gluon/config-mode/www/static/ $(LN) /lib/gluon/web/www/static/osm.js $(1)/lib/gluon/config-mode/www/static/osm.js - $(call GluonInstallI18N,gluon-config-mode-geo-location-with-map,$(1)) + $(call GluonInstallI18N,$(1),$(PKG_BUILD_DIR)/gluon-config-mode-geo-location-with-map) endef define Package/gluon-config-mode-geo-location/postinst diff --git a/package/gluon-config-mode-geo-location/src/de.po.in b/package/gluon-config-mode-geo-location/src/de.po.in index 441e1f3f..11cf424a 100644 --- a/package/gluon-config-mode-geo-location/src/de.po.in +++ b/package/gluon-config-mode-geo-location/src/de.po.in @@ -13,7 +13,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" - +\n msgid "" "If you want the location of your node to be displayed on the map, you may " "enter its coordinates here. " @@ -30,24 +30,24 @@ msgstr "" "hast du die Möglichkeit die Position des Routers auf der Karte auszuwählen." #endif "Bitte berücksichtige, dass das Setzen einer Position die Netzwerkqualität verbessern kann." - +\n msgid "Geo-Location" msgstr "Geo-Position" - +\n msgid "Static location" msgstr "Manuelle Position" - +\n msgid "Disabled" msgstr "Deaktiviert" - +\n msgid "Share your location to see your router on the map" msgstr "Position für die Karte freigeben" - +\n msgid "Latitude" msgstr "Breitengrad" - +\n msgid "Longitude" msgstr "Längengrad" - +\n msgid "e.g. %s" msgstr "z.B. %s" diff --git a/package/gluon-config-mode-geo-location/src/fr.po.in b/package/gluon-config-mode-geo-location/src/fr.po.in index 91726dae..ffb89293 100644 --- a/package/gluon-config-mode-geo-location/src/fr.po.in +++ b/package/gluon-config-mode-geo-location/src/fr.po.in @@ -13,7 +13,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" - +\n msgid "" "If you want the location of your node to be displayed on the map, you may " "enter its coordinates here. " @@ -28,24 +28,24 @@ msgstr "" "Si votre PC est connecté à Internet, vous pouvez également cliquer sur la carte ci-dessous." #endif "Gardez à l'esprit que la définition d'un emplacement peut également améliorer la qualité du réseau." - +\n msgid "Geo-Location" msgstr "Géolocalisation" - +\n msgid "Static location" msgstr "position manuelle" - +\n msgid "Disabled" msgstr "Désactivé" - +\n msgid "Share your location to see your router on the map" msgstr "Partagez votre emplacement pour voir votre routeur sur la carte" - +\n msgid "Latitude" msgstr "Latitude" - +\n msgid "Longitude" msgstr "Longitude" - +\n msgid "e.g. %s" msgstr "Ex: %s" diff --git a/package/gluon-config-mode-geo-location/src/gluon-config-mode-geo-location.pot.in b/package/gluon-config-mode-geo-location/src/gluon-config-mode-geo-location.pot.in index abdab55d..0676b22c 100644 --- a/package/gluon-config-mode-geo-location/src/gluon-config-mode-geo-location.pot.in +++ b/package/gluon-config-mode-geo-location/src/gluon-config-mode-geo-location.pot.in @@ -1,6 +1,6 @@ msgid "" msgstr "Content-Type: text/plain; charset=UTF-8" - +\n msgid "" "If you want the location of your node to be displayed on the map, you may " "enter its coordinates here. " @@ -9,24 +9,24 @@ msgid "" #endif "Please keep in mind setting a location can also enhance the network quality." msgstr "" - +\n msgid "Geo-Location" msgstr "" - +\n msgid "Static location" msgstr "" - +\n msgid "Disabled" msgstr "" - +\n msgid "Share your location to see your router on the map" msgstr "" - +\n msgid "Latitude" msgstr "" - +\n msgid "Longitude" msgstr "" - +\n msgid "e.g. %s" msgstr ""