summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMert Tumer <merttumer@outlook.com>2018-11-01 22:03:31 +0300
committerGülşah Köse <gulsah.1004@gmail.com>2018-11-02 01:33:22 +0100
commit1239dce2595877ad64fd8c8fd927ea4285d69abe (patch)
treeef5286c6f74a3bc2a6dcd3e67d97ebf584dfa9e0
parent187a3db08ecc0e42787aa57d8b4ed67aa9c37e74 (diff)
[Pardus] language improvements on Android
More hardcoded strings extrated to the resource file Few Turkish language improvements This patch is sponsored by ULAKBIM/Pardus project. Signed-off-by: Mert Tumer <merttumer@outlook.com> Change-Id: I9c49d1b8ec3dfc88a19832a2cdea2c7cbaf2be42 Reviewed-on: https://gerrit.libreoffice.org/62757 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.1004@gmail.com>
-rw-r--r--android/source/res/layout/toolbar_bottom.xml4
-rw-r--r--android/source/res/values-tr/strings.xml19
-rw-r--r--android/source/res/values/arrays.xml4
-rw-r--r--android/source/res/values/strings.xml13
-rw-r--r--android/source/src/java/org/libreoffice/FormattingController.java4
-rw-r--r--android/source/src/java/org/libreoffice/LOKitTileProvider.java16
-rw-r--r--android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java6
-rw-r--r--android/source/src/java/org/libreoffice/overlay/DocumentOverlayView.java3
-rw-r--r--android/source/src/java/org/libreoffice/storage/external/BrowserSelectorActivity.java3
-rw-r--r--android/source/src/java/org/libreoffice/ui/PageView.java2
10 files changed, 52 insertions, 22 deletions
diff --git a/android/source/res/layout/toolbar_bottom.xml b/android/source/res/layout/toolbar_bottom.xml
index bfe5f74828b3..6fc85ea96290 100644
--- a/android/source/res/layout/toolbar_bottom.xml
+++ b/android/source/res/layout/toolbar_bottom.xml
@@ -365,7 +365,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="Font Color"
+ android:text="@string/font_color"
android:paddingBottom="12dp"
android:paddingTop="12dp"
android:textSize="14sp"
@@ -394,7 +394,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="Highlight Color"
+ android:text="@string/highlight_color"
android:paddingBottom="12dp"
android:paddingTop="12dp"
android:textSize="14sp"
diff --git a/android/source/res/values-tr/strings.xml b/android/source/res/values-tr/strings.xml
index ce22a1e3050b..518780657a40 100644
--- a/android/source/res/values-tr/strings.xml
+++ b/android/source/res/values-tr/strings.xml
@@ -194,13 +194,13 @@
<string-array name="insertrowscolumns">
<item>Satırları öncekine ekle</item>
<item>Satırları sonrakine ekle</item>
- <item>Kolonları öncekine ekle</item>
- <item>Kolonları sonrakine ekle</item>
+ <item>Sütunları öncekine ekle</item>
+ <item>Sütunları sonrakine ekle</item>
<item>Tablo Ekle</item>
</string-array>
<string-array name="deleterowcolumns">
<item>Satır Sil</item>
- <item>Kolon Sil</item>
+ <item>Sütun Sil</item>
<item>Tablo Sil</item>
</string-array>
@@ -227,4 +227,17 @@
<string name="pref_filter_summary">Varsayılan dosya filtrelemesini seç</string>
<string name="display_language">Uygulama Dili</string>
<string name="display_language_summary">Varsayılan dili değiştir</string>
+ <string name="unable_to_export_pdf">Unable to export to pdf</string>
+ <string name="pdf_exported_at">Exported to PDF at</string>
+ <string name="printing_not_supported">Your device does not support printing</string>
+ <string name="error">Hata</string>
+ <string name="enter_part_name">Bölüm ismi girin.</string>
+ <string name="bmp_null">Bmp boş!</string>
+ <string name="directory_not_saved">Dizin kaydedilmedi.</string>
+ <string name="page">Sayfa</string>
+ <string name="sheet">Tablo</string>
+ <string name="slide">Slide</string>
+ <string name="part">Bölüm</string>
+ <string name="highlight_color">Vurgulama Rengi</string>
+ <string name="font_color">Metin Rengi</string>
</resources>
diff --git a/android/source/res/values/arrays.xml b/android/source/res/values/arrays.xml
index 5912f08900b9..3b2c71c3dadc 100644
--- a/android/source/res/values/arrays.xml
+++ b/android/source/res/values/arrays.xml
@@ -26,8 +26,8 @@
</string-array>
<!-- View Mode names,values -->
<string-array name="ViewModeNames">
- <item >Grid</item>
- <item >List</item>
+ <item >@string/grid_view</item>
+ <item >@string/list_view</item>
</string-array>
<string-array name="ViewModeStringValues">
<item >0</item>
diff --git a/android/source/res/values/strings.xml b/android/source/res/values/strings.xml
index 99a6d809f042..123751b8ee3b 100644
--- a/android/source/res/values/strings.xml
+++ b/android/source/res/values/strings.xml
@@ -227,4 +227,17 @@
<string name="pref_filter_summary">Set which file filter should be used by default.</string>
<string name="display_language">Display Language</string>
<string name="display_language_summary">Set the default display language</string>
+ <string name="unable_to_export_pdf">Unable to export to pdf</string>
+ <string name="pdf_exported_at">Exported to PDF at</string>
+ <string name="printing_not_supported">Your device does not support printing</string>
+ <string name="error">Error</string>
+ <string name="enter_part_name">Enter a part name</string>
+ <string name="bmp_null">Bmp is null!</string>
+ <string name="directory_not_saved">Directory not saved.</string>
+ <string name="page">Page</string>
+ <string name="sheet">Sheet</string>
+ <string name="slide">Slide</string>
+ <string name="part">Part</string>
+ <string name="highlight_color">Highlight Color</string>
+ <string name="font_color">Font Color</string>
</resources>
diff --git a/android/source/src/java/org/libreoffice/FormattingController.java b/android/source/src/java/org/libreoffice/FormattingController.java
index 691c3d06513f..63b4cc53ad35 100644
--- a/android/source/src/java/org/libreoffice/FormattingController.java
+++ b/android/source/src/java/org/libreoffice/FormattingController.java
@@ -305,7 +305,7 @@ class FormattingController implements View.OnClickListener {
AlertDialog.Builder insertBuilder = new AlertDialog.Builder(mContext);
insertBuilder.setTitle(R.string.select_insert_options);
- insertBuilder.setNeutralButton("Cancel", null);
+ insertBuilder.setNeutralButton(R.string.alert_cancel, null);
final int[] selectedItem = new int[1];
insertBuilder.setSingleChoiceItems(mContext.getResources().getStringArray(R.array.insertrowscolumns), -1, new DialogInterface.OnClickListener() {
@Override
@@ -313,7 +313,7 @@ class FormattingController implements View.OnClickListener {
selectedItem[0] = which;
}
});
- insertBuilder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
+ insertBuilder.setPositiveButton(R.string.alert_ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
switch (selectedItem[0]){
diff --git a/android/source/src/java/org/libreoffice/LOKitTileProvider.java b/android/source/src/java/org/libreoffice/LOKitTileProvider.java
index 36075b05e025..c38b5c1607ab 100644
--- a/android/source/src/java/org/libreoffice/LOKitTileProvider.java
+++ b/android/source/src/java/org/libreoffice/LOKitTileProvider.java
@@ -152,6 +152,8 @@ class LOKitTileProvider implements TileProvider {
String partName = mDocument.getPartName(i);
if (partName.isEmpty()) {
partName = getGenericPartName(i);
+ }else if (partName.startsWith("Slide") || partName.startsWith("Sheet") || partName.startsWith("Part")) {
+ partName = getGenericPartName(i);
}
Log.i(LOGTAG, "Document part " + i + " name:'" + partName + "'");
@@ -312,7 +314,7 @@ class LOKitTileProvider implements TileProvider {
@Override
public void run() {
// There was some error
- mContext.showCustomStatusMessage("Unable to export to pdf");
+ mContext.showCustomStatusMessage(mContext.getString(R.string.unable_to_export_pdf));
}
});
}else {
@@ -338,7 +340,7 @@ class LOKitTileProvider implements TileProvider {
@Override
public void run() {
// There was no error
- mContext.showCustomStatusMessage("Exported to PDF at "+filePath);
+ mContext.showCustomStatusMessage(mContext.getString(R.string.pdf_exported_at)+filePath);
}
});
} else {
@@ -383,7 +385,7 @@ class LOKitTileProvider implements TileProvider {
e.printStackTrace();
}
} else {
- mContext.showCustomStatusMessage("Your device does not support printing");
+ mContext.showCustomStatusMessage(mContext.getString(R.string.printing_not_supported));
}
}
@@ -440,14 +442,14 @@ class LOKitTileProvider implements TileProvider {
switch (mDocument.getDocumentType()) {
case Document.DOCTYPE_DRAWING:
case Document.DOCTYPE_TEXT:
- return "Page " + (i + 1);
+ return mContext.getString(R.string.page) + " " + (i + 1);
case Document.DOCTYPE_SPREADSHEET:
- return "Sheet " + (i + 1);
+ return mContext.getString(R.string.sheet) + " " + (i + 1);
case Document.DOCTYPE_PRESENTATION:
- return "Slide " + (i + 1);
+ return mContext.getString(R.string.slide) + " " + (i + 1);
case Document.DOCTYPE_OTHER:
default:
- return "Part " + (i + 1);
+ return mContext.getString(R.string.part) + " " + (i + 1);
}
}
diff --git a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
index 20135beb1084..5472ac903de1 100644
--- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
+++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
@@ -698,9 +698,9 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(LibreOfficeMainActivity.this);
- alertDialogBuilder.setTitle("Error");
+ alertDialogBuilder.setTitle(R.string.error);
alertDialogBuilder.setMessage(message);
- alertDialogBuilder.setNeutralButton("OK", new DialogInterface.OnClickListener() {
+ alertDialogBuilder.setNeutralButton(R.string.alert_ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
finish();
}
@@ -748,7 +748,7 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin
public void renamePart(){
AlertDialog.Builder builder = new AlertDialog.Builder(this);
- builder.setTitle("Enter a part name");
+ builder.setTitle(R.string.enter_part_name);
final EditText input = new EditText(this);
input.setInputType(InputType.TYPE_CLASS_TEXT);
builder.setView(input);
diff --git a/android/source/src/java/org/libreoffice/overlay/DocumentOverlayView.java b/android/source/src/java/org/libreoffice/overlay/DocumentOverlayView.java
index 00dabc8a8c43..b425fbb59ef2 100644
--- a/android/source/src/java/org/libreoffice/overlay/DocumentOverlayView.java
+++ b/android/source/src/java/org/libreoffice/overlay/DocumentOverlayView.java
@@ -19,6 +19,7 @@ import android.view.MotionEvent;
import android.view.View;
import org.libreoffice.LibreOfficeMainActivity;
+import org.libreoffice.R;
import org.libreoffice.canvas.AdjustLengthLine;
import org.libreoffice.canvas.CalcSelectionBox;
import org.libreoffice.canvas.Cursor;
@@ -301,7 +302,7 @@ public class DocumentOverlayView extends View implements View.OnTouchListener {
// if page rectangle canvas element is not visible or the page number is changed, show
if (!mPageNumberRect.isVisible() || index != previousIndex) {
previousIndex = index;
- String pageNumberString = "Page " + index + " of " + mPartPageRectangles.size();
+ String pageNumberString = getContext().getString(R.string.page) + " " + index + "/" + mPartPageRectangles.size();
mPageNumberRect.setPageNumberString(pageNumberString);
mPageNumberRect.setVisible(true);
invalidate();
diff --git a/android/source/src/java/org/libreoffice/storage/external/BrowserSelectorActivity.java b/android/source/src/java/org/libreoffice/storage/external/BrowserSelectorActivity.java
index 90a15ae95af4..07b64623b701 100644
--- a/android/source/src/java/org/libreoffice/storage/external/BrowserSelectorActivity.java
+++ b/android/source/src/java/org/libreoffice/storage/external/BrowserSelectorActivity.java
@@ -12,6 +12,7 @@ import android.preference.PreferenceManager;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
+import org.libreoffice.R;
import org.libreoffice.storage.DocumentProviderFactory;
import java.util.Set;
@@ -108,7 +109,7 @@ public class BrowserSelectorActivity extends AppCompatActivity {
}
unregisterListeners();
Log.d(LOGTAG, "Preference saved: " +
- preferences.getString(preferenceKey, "Directory not saved."));
+ preferences.getString(preferenceKey, getString(R.string.directory_not_saved)));
finish();
}
diff --git a/android/source/src/java/org/libreoffice/ui/PageView.java b/android/source/src/java/org/libreoffice/ui/PageView.java
index 76b1a1c686d6..1d32a7de7e80 100644
--- a/android/source/src/java/org/libreoffice/ui/PageView.java
+++ b/android/source/src/java/org/libreoffice/ui/PageView.java
@@ -61,7 +61,7 @@ public class PageView extends View{
mPaintBlack);//
}
if( bmp == null)
- canvas.drawText("Bmp is null!", 100, 100, new Paint());
+ canvas.drawText(getContext().getString(R.string.bmp_null), 100, 100, new Paint());
}
}