summaryrefslogtreecommitdiff
path: root/mysqlc
diff options
context:
space:
mode:
authorAndras Timar <atimar@suse.com>2011-10-30 22:25:12 +0100
committerAndras Timar <atimar@suse.com>2011-10-30 22:25:12 +0100
commit726fe9cc4e89f1c4bcd74c64bcfc5b7785b6e642 (patch)
tree4246c005aa996c7d8cfbe84a0afca18ab28f8641 /mysqlc
parent184653370717f99e0cce817822caecde01d20006 (diff)
enable localization of extension descriptions in mysqlc
Diffstat (limited to 'mysqlc')
-rw-r--r--mysqlc/source/description-en-US.txt1
-rw-r--r--mysqlc/source/description.xml4
-rw-r--r--mysqlc/source/description/description_de.txt1
-rwxr-xr-xmysqlc/source/description/description_en-US.txt1
-rw-r--r--mysqlc/source/description/description_es.txt1
-rw-r--r--mysqlc/source/description/description_fr.txt1
-rw-r--r--mysqlc/source/description/description_hu.txt1
-rw-r--r--mysqlc/source/description/description_it.txt1
-rw-r--r--mysqlc/source/description/description_ja.txt1
-rw-r--r--mysqlc/source/description/description_ko.txt1
-rw-r--r--mysqlc/source/description/description_nl.txt1
-rw-r--r--mysqlc/source/description/description_pl.txt1
-rw-r--r--mysqlc/source/description/description_pt-BR.txt1
-rw-r--r--mysqlc/source/description/description_pt.txt1
-rw-r--r--mysqlc/source/description/description_ru.txt1
-rw-r--r--mysqlc/source/description/description_sv.txt1
-rw-r--r--mysqlc/source/description/description_zh-CN.txt1
-rw-r--r--mysqlc/source/description/description_zh-TW.txt1
-rw-r--r--mysqlc/source/makefile.mk41
-rw-r--r--mysqlc/version.mk8
20 files changed, 10 insertions, 60 deletions
diff --git a/mysqlc/source/description-en-US.txt b/mysqlc/source/description-en-US.txt
new file mode 100644
index 000000000000..d99ac31d4374
--- /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 ca9c1e77613f..53f483b7c5cf 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 acdaea342571..000000000000
--- 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 a8ddd5985cfc..000000000000
--- 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 9e04c85fbd84..000000000000
--- 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 ca3073273834..000000000000
--- 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 0b60de706018..000000000000
--- 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 36326e214bf6..000000000000
--- 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 3d6a70eb9489..000000000000
--- 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 6b4ca29be8ce..000000000000
--- 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 1405fd0b2ff1..000000000000
--- 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 03e0f23bbc99..000000000000
--- 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 21d3ba28a5da..000000000000
--- 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 1f05c487e03e..000000000000
--- 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 633b2c9514df..000000000000
--- 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 d7fc80975763..000000000000
--- 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 c38bc47a41a8..000000000000
--- 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 de628909d369..000000000000
--- 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 9af646c0f383..faec1024cfc7 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 5713d5265258..1ca2272bdafa 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