[Libreoffice-commits] .: mysqlc/source mysqlc/version.mk

Andras Timar timar at kemper.freedesktop.org
Sun Oct 30 14:25:23 PDT 2011


 mysqlc/source/description-en-US.txt             |    1 
 mysqlc/source/description.xml                   |    4 +-
 mysqlc/source/description/description_de.txt    |    1 
 mysqlc/source/description/description_en-US.txt |    1 
 mysqlc/source/description/description_es.txt    |    1 
 mysqlc/source/description/description_fr.txt    |    1 
 mysqlc/source/description/description_hu.txt    |    1 
 mysqlc/source/description/description_it.txt    |    1 
 mysqlc/source/description/description_ja.txt    |    1 
 mysqlc/source/description/description_ko.txt    |    1 
 mysqlc/source/description/description_nl.txt    |    1 
 mysqlc/source/description/description_pl.txt    |    1 
 mysqlc/source/description/description_pt-BR.txt |    1 
 mysqlc/source/description/description_pt.txt    |    1 
 mysqlc/source/description/description_ru.txt    |    1 
 mysqlc/source/description/description_sv.txt    |    1 
 mysqlc/source/description/description_zh-CN.txt |    1 
 mysqlc/source/description/description_zh-TW.txt |    1 
 mysqlc/source/makefile.mk                       |   41 ++++--------------------
 mysqlc/version.mk                               |    8 ----
 20 files changed, 10 insertions(+), 60 deletions(-)

New commits:
commit 726fe9cc4e89f1c4bcd74c64bcfc5b7785b6e642
Author: Andras Timar <atimar at suse.com>
Date:   Sun Oct 30 22:25:12 2011 +0100

    enable localization of extension descriptions in mysqlc

diff --git a/mysqlc/source/description-en-US.txt b/mysqlc/source/description-en-US.txt
new file mode 100644
index 0000000..d99ac31
--- /dev/null
+++ b/mysqlc/source/description-en-US.txt
@@ -0,0 +1 @@
+MySQL Connector installs a native MySQL database driver. It is faster, seamless integrated, easier to administrate and there is no need to install and setup a JDBC or ODBC driver separately. It was never easier to use MySQL databases in LibreOffice Base.
diff --git a/mysqlc/source/description.xml b/mysqlc/source/description.xml
index ca9c1e7..53f483b 100644
--- a/mysqlc/source/description.xml
+++ b/mysqlc/source/description.xml
@@ -6,7 +6,7 @@
     <version value="#VERSION#" />
     <platform value="UPDATED_SUPPORTED_PLATFORM" />
     <display-name>
-        <name lang="en-US">#TITLE#</name>
+        <name lang="en-US">MySQL Connector</name>
     </display-name>
     <dependencies>
          <OpenOffice.org-minimal-version value="3.1" d:name="OpenOffice.org 3.1"/>
@@ -18,6 +18,6 @@
         <default xlink:href="images/extension_32.png" />
     </icon>
     <extension-description>
-        <src lang="#LANG#" xlink:href="description/description_#LANG#.txt"/>
+        <src lang="en-US" xlink:href="description-en-US.txt"/>
     </extension-description>
 </description>
diff --git a/mysqlc/source/description/description_de.txt b/mysqlc/source/description/description_de.txt
deleted file mode 100644
index acdaea3..0000000
--- a/mysqlc/source/description/description_de.txt
+++ /dev/null
@@ -1 +0,0 @@
-Verbindet OpenOffice.org direkt mit MySQL-Servern
\ No newline at end of file
diff --git a/mysqlc/source/description/description_en-US.txt b/mysqlc/source/description/description_en-US.txt
deleted file mode 100755
index a8ddd59..0000000
--- a/mysqlc/source/description/description_en-US.txt
+++ /dev/null
@@ -1 +0,0 @@
-The MySQL Connector for OpenOffice.org installs a native MySQL database driver. It is faster, seamless integrated, easier to administrate and there is no need to install and setup a JDBC or ODBC driver separately. It was never easier to use MySQL databases in OpenOffice.org Base.
diff --git a/mysqlc/source/description/description_es.txt b/mysqlc/source/description/description_es.txt
deleted file mode 100644
index 9e04c85..0000000
--- a/mysqlc/source/description/description_es.txt
+++ /dev/null
@@ -1 +0,0 @@
-Conecta OpenOffice.org directamente con los servidores de MySQL
\ No newline at end of file
diff --git a/mysqlc/source/description/description_fr.txt b/mysqlc/source/description/description_fr.txt
deleted file mode 100644
index ca30732..0000000
--- a/mysqlc/source/description/description_fr.txt
+++ /dev/null
@@ -1 +0,0 @@
-Connexion directe d'OpenOffice.org avec les serveurs MySQL.
\ No newline at end of file
diff --git a/mysqlc/source/description/description_hu.txt b/mysqlc/source/description/description_hu.txt
deleted file mode 100644
index 0b60de7..0000000
--- a/mysqlc/source/description/description_hu.txt
+++ /dev/null
@@ -1 +0,0 @@
-Közvetlen kapcsolatot teremt az OpenOffice.org és a MySQL-kiszolgálók között.
\ No newline at end of file
diff --git a/mysqlc/source/description/description_it.txt b/mysqlc/source/description/description_it.txt
deleted file mode 100644
index 36326e2..0000000
--- a/mysqlc/source/description/description_it.txt
+++ /dev/null
@@ -1 +0,0 @@
-Consente la connessione diretta tra OpenOffice.org e i server MySQL
\ No newline at end of file
diff --git a/mysqlc/source/description/description_ja.txt b/mysqlc/source/description/description_ja.txt
deleted file mode 100644
index 3d6a70e..0000000
--- a/mysqlc/source/description/description_ja.txt
+++ /dev/null
@@ -1 +0,0 @@
-OpenOffice.org を MySQL サーバーと直接に接続させる
\ No newline at end of file
diff --git a/mysqlc/source/description/description_ko.txt b/mysqlc/source/description/description_ko.txt
deleted file mode 100644
index 6b4ca29..0000000
--- a/mysqlc/source/description/description_ko.txt
+++ /dev/null
@@ -1 +0,0 @@
-MySQL 서버를 통해 OpenOffice.org에 직접 연결합니다.
\ No newline at end of file
diff --git a/mysqlc/source/description/description_nl.txt b/mysqlc/source/description/description_nl.txt
deleted file mode 100644
index 1405fd0..0000000
--- a/mysqlc/source/description/description_nl.txt
+++ /dev/null
@@ -1 +0,0 @@
-Verbindt OpenOffice.org direct met MySQL Servers
\ No newline at end of file
diff --git a/mysqlc/source/description/description_pl.txt b/mysqlc/source/description/description_pl.txt
deleted file mode 100644
index 03e0f23..0000000
--- a/mysqlc/source/description/description_pl.txt
+++ /dev/null
@@ -1 +0,0 @@
-Laczy witryne OpenOffice.org bezposrednio z systemem MySQL Servers
\ No newline at end of file
diff --git a/mysqlc/source/description/description_pt-BR.txt b/mysqlc/source/description/description_pt-BR.txt
deleted file mode 100644
index 21d3ba2..0000000
--- a/mysqlc/source/description/description_pt-BR.txt
+++ /dev/null
@@ -1 +0,0 @@
-Conecta o OpenOffice.org diretamente aos servidores MySQL
\ No newline at end of file
diff --git a/mysqlc/source/description/description_pt.txt b/mysqlc/source/description/description_pt.txt
deleted file mode 100644
index 1f05c48..0000000
--- a/mysqlc/source/description/description_pt.txt
+++ /dev/null
@@ -1 +0,0 @@
-Liga o OpenOffice.org directamente aos servidores MySQL
\ No newline at end of file
diff --git a/mysqlc/source/description/description_ru.txt b/mysqlc/source/description/description_ru.txt
deleted file mode 100644
index 633b2c9..0000000
--- a/mysqlc/source/description/description_ru.txt
+++ /dev/null
@@ -1 +0,0 @@
-Подключает OpenOffice.org напрямую к серверам MySQL
diff --git a/mysqlc/source/description/description_sv.txt b/mysqlc/source/description/description_sv.txt
deleted file mode 100644
index d7fc809..0000000
--- a/mysqlc/source/description/description_sv.txt
+++ /dev/null
@@ -1 +0,0 @@
-Ansluter OpenOffice.org direkt till MySQL-servrarna
\ No newline at end of file
diff --git a/mysqlc/source/description/description_zh-CN.txt b/mysqlc/source/description/description_zh-CN.txt
deleted file mode 100644
index c38bc47..0000000
--- a/mysqlc/source/description/description_zh-CN.txt
+++ /dev/null
@@ -1 +0,0 @@
-将 OpenOffice.org 与 MySQL 服务器直接相连
\ No newline at end of file
diff --git a/mysqlc/source/description/description_zh-TW.txt b/mysqlc/source/description/description_zh-TW.txt
deleted file mode 100644
index de62890..0000000
--- a/mysqlc/source/description/description_zh-TW.txt
+++ /dev/null
@@ -1 +0,0 @@
-將 OpenOffice.org 直接連線至 MySQL 伺服器
\ No newline at end of file
diff --git a/mysqlc/source/makefile.mk b/mysqlc/source/makefile.mk
index 9af646c..faec102 100644
--- a/mysqlc/source/makefile.mk
+++ b/mysqlc/source/makefile.mk
@@ -48,13 +48,7 @@ EXTENSION_VERSION_BASE=$(MYSQLC_VERSION_MAJOR).$(MYSQLC_VERSION_MINOR).$(MYSQLC_
     EXTENSION_VERSION=$(EXTENSION_VERSION_BASE)
 
 #---- extension title package name
-.IF "$(MYSQLC_STATUS)" == "final"
-    EXTENSION_TITLE:=$(MYSQLC_TITLE)
-    EXTENSION_ZIPNAME:=$(EXTENSIONNAME)
-.ELSE
-    EXTENSION_TITLE:=$(MYSQLC_TITLE) ($(MYSQLC_STATUS))
-    EXTENSION_ZIPNAME:=$(EXTENSIONNAME)
-.ENDIF
+EXTENSION_ZIPNAME:=$(EXTENSIONNAME)
 
 #-------------------------------------------------------------------
 
@@ -224,22 +218,10 @@ DESC_LANGS=$(WITH_LANG)
 .IF "$(DESC_LANGS)" == ""
     DESC_LANGS=en-US
 .ENDIF
-COMPONENT_DESCRIPTIONS=$/$(foreach,lang,$(DESC_LANGS) description$/description_$(lang).txt)
+COMPONENT_DESCRIPTIONS=$/$(foreach,lang,$(DESC_LANGS) description-$(lang).txt)
 COMPONENT_DESCRIPTIONS_PACKDEP= \
     $(foreach,i,$(COMPONENT_DESCRIPTIONS) $(EXTENSIONDIR)$/$i)
 
-# WITH_LANG might contain languages which we actually do not have a description for (yet)
-# Find those, and treat the specially
-
-# first, find those locales which we actually have a description file for
-EXISTING_DESCRIPTIONS=$(foreach,i,$(shell $(FIND) .$/description -name "description_*.txt") $(i:f))
-EXISTING_LANGS=$(foreach,i,$(EXISTING_DESCRIPTIONS) $(i:s,description_,,:s,.txt,,))
-
-# then, create a version of WITH_LANG where we stripped all those locales
-EXISTING_LANGS_NORMALIZED=$(strip $(EXISTING_LANGS))
-EXISTING_LANGS_NORMALIZED:=+$(EXISTING_LANGS_NORMALIZED:s/ /+/)+
-MISSING_LANGS=$(foreach,lang,$(WITH_LANG) $(eq,$(EXISTING_LANGS_NORMALIZED:s/+$(lang)+//),$(EXISTING_LANGS_NORMALIZED) $(lang)  ))
-
 # ........ dependencies for packaging the extension ........
 EXTENSION_PACKDEPS=makefile.mk $(COMPONENT_IMAGES) $(COMPONENT_DESCRIPTIONS_PACKDEP) $(COMPONENT_MERGED_XCU)
 
@@ -260,11 +242,6 @@ $(COMPONENT_IMAGES) : $(SOLARSRC)$/$(RSCDEFIMG)$/desktop$/res$/$$(@:f)
     @@-$(MKDIRHIER) $(@:d)
     $(COPY) $< $@
 
-# existing descriptions: just copy
-$(EXTENSIONDIR)$/description$/%.txt: .$/description$/%.txt
-    @@-$(MKDIRHIER) $(@:d)
-    @$(COPY) $< $@ > $(NULLDEV)
-
 # xcu files: copy
 # the following is a hack for now - need to find out the generic mechanism later
 
@@ -272,17 +249,13 @@ $(EXTENSIONDIR)$/registry$/data$/org$/openoffice$/Office$/DataAccess$/Drivers.xc
     @@-$(MKDIRHIER) $(EXTENSIONDIR)$/registry$/data$/org$/openoffice$/Office$/DataAccess
     @$(COPY) $< $(EXTENSIONDIR)$/registry$/data$/org$/openoffice$/Office$/DataAccess$/Drivers.xcu > $(NULLDEV)
 
-# non-existing descriptions: copy from the English version
-.IF "$(strip $(MISSING_LANGS))" != ""
-$(foreach,i,$(MISSING_LANGS) $(EXTENSIONDIR)$/description$/description_$i.txt): .$/description$/description_en-US.txt
-    @echo ------ WARNING: .$/description$/$(@:f) not found, falling back to English description
-    @@-$(MKDIRHIER) $(@:d)
-    @$(COPY) $< $@ > $(NULLDEV)
-.ENDIF
-
 $(DESCRIPTION_SRC): description.xml
     +-$(RM) $@
-    $(TYPE) description.xml | $(SED) "s/#VERSION#/$(EXTENSION_VERSION)/" | $(SED) "s,#TITLE#,$(EXTENSION_TITLE)," > $@
+    $(XRMEX) -p $(PRJNAME) -i $< -o $@ -m $(LOCALIZESDF) -l all
+    $(SED) "s/#VERSION#/$(EXTENSION_VERSION)/" < $@ > $@.new
+    mv $@.new $@
+    @$(COPY) $(@:d)/description-*.txt $(EXTENSIONDIR)
+    @$(COPY) description-en-US.txt $(EXTENSIONDIR)
 
 .IF "$(SYSTEM_MYSQL)" != "YES" 
 # --- the MySQL client lib needs to be copied
diff --git a/mysqlc/version.mk b/mysqlc/version.mk
index 5713d52..1ca2272 100644
--- a/mysqlc/version.mk
+++ b/mysqlc/version.mk
@@ -28,11 +28,3 @@
 MYSQLC_VERSION_MAJOR=1
 MYSQLC_VERSION_MINOR=0
 MYSQLC_VERSION_MICRO=1
-
-# the title, as displayed in the Extension Manager
-MYSQLC_TITLE=MySQL Connector
-
-# the status of the extension
-# if this is different from "final", it will be appended to the title displayed in the Extension Manager
-# and also added to the file name of the resulting .oxt file
-MYSQLC_STATUS=final


More information about the Libreoffice-commits mailing list