Localization improvements and removing some unused code
git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@143 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
parent
de74e5ff6b
commit
e3a808f820
39 changed files with 435 additions and 1442 deletions
88
source/java/writer2latex/xhtml/l10n/L10n.java
Normal file
88
source/java/writer2latex/xhtml/l10n/L10n.java
Normal file
|
@ -0,0 +1,88 @@
|
|||
/************************************************************************
|
||||
*
|
||||
* L10n.java
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License version 2.1, as published by the Free Software Foundation.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
* Copyright: 2002-2012 by Henrik Just
|
||||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Version 1.4 (2012-03-16)
|
||||
*
|
||||
*/
|
||||
|
||||
package writer2latex.xhtml.l10n;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
/* This class handles localized strings (used for navigation links in the exported document)
|
||||
* Note that the US-English strings need duplicated due to ResourceBundles' search order.
|
||||
* Default strings are needed for the special case that neither strings for the document language,
|
||||
* nor for the system default language are available.
|
||||
* US-English strings are needed if the document language is English and the system locale is not.
|
||||
*/
|
||||
public class L10n {
|
||||
public final static int UP = 0;
|
||||
public final static int FIRST = 1;
|
||||
public final static int PREVIOUS = 2;
|
||||
public final static int NEXT = 3;
|
||||
public final static int LAST = 4;
|
||||
public final static int CONTENTS = 5;
|
||||
public final static int INDEX = 6;
|
||||
public final static int HOME = 7;
|
||||
public final static int DIRECTORY = 8;
|
||||
public final static int DOCUMENT = 9;
|
||||
|
||||
private ResourceBundle resourceBundle = ResourceBundle.getBundle("writer2latex.xhtml.l10n.XhtmlStrings",Locale.getDefault());
|
||||
private Locale locale = null;
|
||||
|
||||
public void setLocale(String sLanguage, String sCountry) {
|
||||
if (sLanguage!=null) {
|
||||
if (sCountry!=null) {
|
||||
locale = new Locale(sLanguage,sCountry);
|
||||
}
|
||||
else {
|
||||
locale = new Locale(sLanguage);
|
||||
}
|
||||
}
|
||||
else {
|
||||
locale = Locale.getDefault();
|
||||
}
|
||||
|
||||
resourceBundle = ResourceBundle.getBundle("writer2latex.xhtml.l10n.XhtmlStrings",locale);
|
||||
}
|
||||
|
||||
public Locale getLocale() {
|
||||
return locale;
|
||||
}
|
||||
|
||||
public String get(int nString) {
|
||||
switch (nString) {
|
||||
case UP: return resourceBundle.getString("up");
|
||||
case FIRST : return resourceBundle.getString("first");
|
||||
case PREVIOUS : return resourceBundle.getString("previous");
|
||||
case NEXT : return resourceBundle.getString("next");
|
||||
case LAST : return resourceBundle.getString("last");
|
||||
case CONTENTS : return resourceBundle.getString("contents");
|
||||
case INDEX : return resourceBundle.getString("index");
|
||||
case HOME : return resourceBundle.getString("home");
|
||||
case DIRECTORY: return resourceBundle.getString("directory");
|
||||
case DOCUMENT: return resourceBundle.getString("document");
|
||||
default: return "???";
|
||||
}
|
||||
}
|
||||
}
|
11
source/java/writer2latex/xhtml/l10n/XhtmlStrings.properties
Normal file
11
source/java/writer2latex/xhtml/l10n/XhtmlStrings.properties
Normal file
|
@ -0,0 +1,11 @@
|
|||
# XHTML specific strings for Writer2LaTeX
|
||||
up=Up
|
||||
first=First
|
||||
previous=Previous
|
||||
next=Next
|
||||
last=Last
|
||||
contents=Contents
|
||||
index=Index
|
||||
home=Home
|
||||
directory=Directory
|
||||
document=Document
|
|
@ -0,0 +1,11 @@
|
|||
# XHTML specific strings for Writer2LaTeX
|
||||
up=Amunt
|
||||
first=Comen\u00e7ament
|
||||
previous=Precedent
|
||||
next=Seg\u00fcent
|
||||
last=Darrer
|
||||
contents=Contingut
|
||||
index=\u00cdndex
|
||||
home=Arrel
|
||||
directory=Directori
|
||||
document=Document
|
|
@ -0,0 +1,11 @@
|
|||
# XHTML specific strings for Writer2LaTeX
|
||||
up=Nahoru
|
||||
first=Prvn\u00ed
|
||||
previous=P\u0159edchoz\u00ed
|
||||
next=Dal\u0161\u00ed
|
||||
last=Posledn\u00ed
|
||||
contents=Obsah
|
||||
index=Rejst\u0159\u00edk
|
||||
home=Dom\u016f
|
||||
directory=Adres\u00e1\u0159 (slo\u017eka)
|
||||
document=Dokument
|
|
@ -0,0 +1,11 @@
|
|||
# XHTML specific strings for Writer2LaTeX
|
||||
up=Op
|
||||
first=F\u00F8rste
|
||||
previous=Forrige
|
||||
next=N\u00E6ste
|
||||
last=Sidste
|
||||
contents=Indhold
|
||||
index=Stikord
|
||||
home=Hjem
|
||||
directory=Mappe
|
||||
document=Dokument
|
|
@ -0,0 +1,11 @@
|
|||
# XHTML specific strings for Writer2LaTeX
|
||||
up=Nach oben
|
||||
first=Anfang
|
||||
previous=Vorheriges
|
||||
next=N\u00e4chstes
|
||||
last=Ende
|
||||
contents=Inhalte
|
||||
index=Index
|
||||
home=Home
|
||||
directory=Verzeichnis
|
||||
document=Dokument
|
|
@ -0,0 +1,11 @@
|
|||
# XHTML specific strings for Writer2LaTeX
|
||||
up=Up
|
||||
first=First
|
||||
previous=Previous
|
||||
next=Next
|
||||
last=Last
|
||||
contents=Contents
|
||||
index=Index
|
||||
home=Home
|
||||
directory=Directory
|
||||
document=Document
|
|
@ -0,0 +1,11 @@
|
|||
# XHTML specific strings for Writer2LaTeX
|
||||
up=Arriba
|
||||
first=Primero
|
||||
previous=Previo
|
||||
next=Siguiente
|
||||
last=\u00daltimo
|
||||
contents=Contenido
|
||||
index=\u00cdndice
|
||||
home=Inicio
|
||||
directory=Directorio
|
||||
document=Documento
|
|
@ -0,0 +1,11 @@
|
|||
# XHTML specific strings for Writer2LaTeX
|
||||
up=\u0628\u0627\u0644\u0627
|
||||
first=\u0627\u0648\u0644
|
||||
previous=\u0642\u0628\u0644\u06cc
|
||||
next=\u0628\u0639\u062f\u06cc
|
||||
last=\u0627\u062e\u0631\u06cc\u0646
|
||||
contents=Contents
|
||||
index=\u0641\u0647\u0631\u0633\u062a
|
||||
home=\u062e\u0627\u0646\u0647
|
||||
directory=\u067e\u0648\u0634\u0647
|
||||
document=\u0645\u0633\u062a\u0646\u062f
|
|
@ -0,0 +1,11 @@
|
|||
# XHTML specific strings for Writer2LaTeX
|
||||
up=Yl\u00f6s
|
||||
first=Ensimm\u00e4inen
|
||||
previous=Edellinen
|
||||
next=Seuraava
|
||||
last=Viimeinen
|
||||
contents=Sis\u00e4lt\u00f6
|
||||
index=Indeksi
|
||||
home=Koti
|
||||
directory=Hakemisto
|
||||
document=Dokumentti
|
|
@ -0,0 +1,11 @@
|
|||
# XHTML specific strings for Writer2LaTeX
|
||||
up=Haut
|
||||
first=D\u00e9but
|
||||
previous=Pr\u00e9c\u00e9dent
|
||||
next=Suivant
|
||||
last=Dernier
|
||||
contents=Contenus
|
||||
index=Index
|
||||
home=Documents Personnels
|
||||
directory=R\u00e9pertoire
|
||||
document=Document
|
|
@ -0,0 +1,11 @@
|
|||
# XHTML specific strings for Writer2LaTeX
|
||||
up=Up
|
||||
first=Prvi
|
||||
previous=Prethodan
|
||||
next=slijede\u0107i
|
||||
last=Zadnji
|
||||
contents=Sadr\u017Eaj
|
||||
index=Indeks
|
||||
home=Home
|
||||
directory=Directory
|
||||
document=Document
|
|
@ -0,0 +1,11 @@
|
|||
# XHTML specific strings for Writer2LaTeX
|
||||
up=Su
|
||||
first=Inizio
|
||||
previous=Precedente
|
||||
next=Successivo
|
||||
last=Fine
|
||||
contents=Sommario
|
||||
index=Indice
|
||||
home=Home
|
||||
directory=Cartella
|
||||
document=Documento
|
|
@ -0,0 +1,11 @@
|
|||
# XHTML specific strings for Writer2LaTeX
|
||||
up=Omhoog
|
||||
first=Eerste
|
||||
previous=Vorige
|
||||
next=Volgende
|
||||
last=Laatste
|
||||
contents=Inhoud
|
||||
index=Index
|
||||
home=Hoofdpagina
|
||||
directory=Directory
|
||||
document=Document
|
|
@ -0,0 +1,11 @@
|
|||
# XHTML specific strings for Writer2LaTeX
|
||||
up=Opp
|
||||
first=F\u00f8rste
|
||||
previous=Forrige
|
||||
next=Neste
|
||||
last=Siste
|
||||
contents=Innhald
|
||||
index=Register
|
||||
home=Heim
|
||||
directory=Mappe
|
||||
document=Dokument
|
|
@ -0,0 +1,11 @@
|
|||
# XHTML specific strings for Writer2LaTeX
|
||||
up=W g\u00f3r\u0119
|
||||
first=Pierwsza
|
||||
previous=Poprzednia
|
||||
next=Nast\u0119pna
|
||||
last=Ostatnia
|
||||
contents=Spis tre\u015bci
|
||||
index=Indeks
|
||||
home=Pocz\u0105tek
|
||||
directory=Katalog
|
||||
document=Dokument
|
|
@ -0,0 +1,11 @@
|
|||
# XHTML specific strings for Writer2LaTeX
|
||||
up=Acima
|
||||
first=Primeiro
|
||||
previous=Anterior
|
||||
next=Pr\u00f3ximo
|
||||
last=\u00daltimo
|
||||
contents=Conte\u00fado
|
||||
index=\u00cdndice
|
||||
home=Home
|
||||
directory=Diret\u00f3rio
|
||||
document=Documento
|
|
@ -0,0 +1,11 @@
|
|||
# XHTML specific strings for Writer2LaTeX
|
||||
up=\u0412\u0432\u0435\u0440\u0445
|
||||
first=\u041f\u0435\u0440\u0432\u0430\u044f
|
||||
previous=\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f
|
||||
next=\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f
|
||||
last=\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f
|
||||
contents=\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435
|
||||
index=\u0421\u043f\u0438\u0441\u043e\u043a
|
||||
home=\u0414\u043e\u043c\u043e\u0439
|
||||
directory=\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f
|
||||
document=\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442
|
|
@ -0,0 +1,11 @@
|
|||
# XHTML specific strings for Writer2LaTeX
|
||||
up=Yukar\u0131
|
||||
first=\u0130lk
|
||||
previous=\u00d6nceki
|
||||
next=Sonraki
|
||||
last=Son
|
||||
contents=\u0130\u00e7indekiler
|
||||
index=\u0130ndeks
|
||||
home=Ev
|
||||
directory=Klas\u00f6r
|
||||
document=D\u00f6k\u00fcman
|
|
@ -0,0 +1,11 @@
|
|||
# XHTML specific strings for Writer2LaTeX
|
||||
up=\u041d\u0430\u0433\u043e\u0440\u0443
|
||||
first=\u041f\u0435\u0440\u0448\u0430
|
||||
previous=\u041f\u043e\u043f\u0435\u0440\u0435\u0434\u043d\u044f
|
||||
next=\u041d\u0430\u0441\u0442\u0443\u043f\u043d\u0430
|
||||
last=\u041e\u0441\u0442\u0430\u043d\u043d\u044f
|
||||
contents=\u0417\u043c\u0456\u0441\u0442
|
||||
index=\u0421\u043f\u0438\u0441\u043e\u043a
|
||||
home=\u0414\u043e\u0434\u043e\u043c\u0443
|
||||
directory=\u0422\u0435\u043a\u0430
|
||||
document=\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442
|
Loading…
Add table
Add a link
Reference in a new issue