Parcourir la source

muti-language-all

faterhenry il y a 5 ans
Parent
commit
3aa60c960e

+ 12 - 12
src/main/java/com/bomostory/sceneeditmodule/cover/Category.kt

@@ -3,16 +3,16 @@ package com.bomostory.sceneeditmodule.cover
 import com.example.tfat.myapplication.R
 
 enum class Category(val id: Int, val stringResId: Int) {
-    Daily(1, R.string.category_item_daily),
-    HumanRelations(2, R.string.category_item_human_relations),
-    Character(3, R.string.category_item_character),
-    Ispirational(4, R.string.category_item_ispirational),
-    Knowledge(5, R.string.category_item_knowledge),
-    Natural(6, R.string.category_item_natural),
-    EnvironmentalProtection(7, R.string.category_item_environmental_protection),
-    Imagine(8, R.string.category_item_imagine),
-    Life(9, R.string.category_item_life),
-    Culture(10, R.string.category_item_culture),
-    Fables(11, R.string.category_item_fables),
-    Others(12, R.string.category_item_others),
+    Daily(1, R.string.uikit_edit_category_daily),
+    HumanRelations(2, R.string.uikit_edit_category_human_relations),
+    Character(3, R.string.uikit_edit_category_character),
+    Ispirational(4, R.string.uikit_edit_category_inspirational),
+    Knowledge(5, R.string.uikit_edit_category_knowledge),
+    Natural(6, R.string.uikit_edit_category_natural),
+    EnvironmentalProtection(7, R.string.uikit_edit_category_environmental_protection),
+    Imagine(8, R.string.uikit_edit_category_imagine),
+    Life(9, R.string.uikit_edit_category_life),
+    Culture(10, R.string.uikit_edit_category_culture),
+    Fables(11, R.string.uikit_edit_category_fables),
+    Others(12, R.string.uikit_edit_category_others),
 }

+ 2 - 2
src/main/java/com/bomostory/sceneeditmodule/cover/CoverEditorDialog.kt

@@ -114,8 +114,8 @@ class CoverEditorDialog : DialogFragment() {
             }
             viewPager.addOnPageChangeListener(TabLayout.TabLayoutOnPageChangeListener(tabLayout))
             tabLayout.apply {
-                addTab(newTab().setText(R.string.cover_editor_dialog_tab_front))
-                addTab(newTab().setText(R.string.cover_editor_dialog_tab_back))
+                addTab(newTab().setText(R.string.uikit_edit_front_cover))
+                addTab(newTab().setText(R.string.uikit_edit_back_cover))
                 addOnTabSelectedListener(object : TabLayout.OnTabSelectedListener {
                     override fun onTabReselected(tab: TabLayout.Tab?) {}
                     override fun onTabUnselected(tab: TabLayout.Tab?) {}

+ 3 - 3
src/main/java/com/bomostory/sceneeditmodule/cover/FrontCoverSceneChooserView.kt

@@ -27,9 +27,9 @@ class FrontCoverSceneChooserView @JvmOverloads constructor(
 ) : ConstraintLayout(context, attrs, defStyleAttr) {
 
     private val alignStyleStringMap = HashMap<AlignStyle, Int>().apply {
-        put(AlignStyle.Center, R.string.front_cover_scene_choose_dialog_align_center)
-        put(AlignStyle.Left, R.string.front_cover_scene_choose_dialog_align_left)
-        put(AlignStyle.Right, R.string.front_cover_scene_choose_dialog_align_right)
+        put(AlignStyle.Center, R.string.uikit_edit_align_to_center)
+        put(AlignStyle.Left, R.string.uikit_edit_align_to_left)
+        put(AlignStyle.Right, R.string.uikit_edit_align_to_right)
     }
     var selected: Int = 0
         private set

+ 3 - 3
src/main/java/com/bomostory/sceneeditmodule/screen/movie/MovieEditActivity.kt

@@ -357,13 +357,13 @@ class MovieEditActivity : AppCompatActivity(),
                         .subscribe({
                             val context = this@MovieEditActivity
                             when (it.errorCode) {
-                                4013 -> Toast.makeText(context, R.string.share_dialog_upload_failed, Toast.LENGTH_SHORT).show()
+                                4013 -> Toast.makeText(context, R.string.uikit_others_shared_failed, Toast.LENGTH_SHORT).show()
                                 else -> {
-                                    Toast.makeText(context, R.string.share_dialog_upload_suc, Toast.LENGTH_SHORT).show()
+                                    Toast.makeText(context, R.string.uikit_others_upload_successfully, Toast.LENGTH_SHORT).show()
                                 }
                             }
                         }, {
-                            Toast.makeText(this@MovieEditActivity, R.string.share_dialog_upload_failed, Toast.LENGTH_SHORT).show()
+                            Toast.makeText(this@MovieEditActivity, R.string.uikit_others_upload_failed, Toast.LENGTH_SHORT).show()
                         })
             }
             onClickMore = Runnable {

+ 1 - 1
src/main/java/com/bomostory/sceneeditmodule/screen/movie/music/MusicSelectDialog.kt

@@ -81,7 +81,7 @@ class MusicSelectDialog : DialogFragment() {
         override fun getPageTitle(position: Int): CharSequence? {
             when (position) {
                 0 -> return getString(R.string.library)
-                1 -> return getString(R.string.device)
+                1 -> return getString(R.string.uikit_edit_device)
             }
             return super.getPageTitle(position)
         }

+ 1 - 1
src/main/java/com/bomostory/sceneeditmodule/utils/Utils.kt

@@ -35,7 +35,7 @@ object Utils {
 
     fun showExportPdfCompleteThenViewDialog(context: Context, authority: String, file: File) {
         AlertDialog.Builder(context)
-                .setMessage(R.string.export_pdf_complete_dialog_msg)
+                .setMessage(R.string.uikit_edit_complete)
                 .setPositiveButton(R.string.export_pdf_complete_dialog_positive) { _, _ ->
                     val uri = FileProvider.getUriForFile(context, authority, file)
                     val intent = Intent(Intent.ACTION_VIEW, uri).apply {

+ 4 - 4
src/main/res/layout/dialog_export_pdf.xml

@@ -18,7 +18,7 @@
     <TextView
         android:id="@+id/tv_exportPdfDialog_name"
         style="@style/Title"
-        android:text="@string/export_pdf_dialog_title"
+        android:text="@string/uikit_edit_choose_pdf_format"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:textColor="@color/cocoa"
@@ -44,7 +44,7 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginLeft="36dp"
-        android:text="@string/export_pdf_dialog_radio_standard"
+        android:text="@string/uikit_edit_standard_pdf"
         android:textColor="@color/cocoa"
         app:layout_constraintBottom_toBottomOf="@id/rb_exportPdfDialog_standard"
         app:layout_constraintLeft_toRightOf="@id/rb_exportPdfDialog_standard"
@@ -136,7 +136,7 @@
         style="@style/Widget.AppCompat.Button.Borderless.Colored"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:text="@string/export_pdf_dialog_print"
+        android:text="@string/uikit_edit_print"
         android:layout_marginTop="48dp"
         android:layout_marginRight="24dp"
         android:layout_marginBottom="24dp"
@@ -150,7 +150,7 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginRight="8dp"
-        android:text="@string/export_pdf_dialog_cancel"
+        android:text="@string/uikit_edit_cancel"
         app:layout_constraintBottom_toBottomOf="@id/btn_exportPdfDialog_print"
         app:layout_constraintRight_toLeftOf="@id/btn_exportPdfDialog_print" />
 </android.support.constraint.ConstraintLayout>

+ 2 - 2
src/main/res/layout/dialog_share.xml

@@ -77,7 +77,7 @@
         android:drawablePadding="8dp"
         android:drawableTop="@drawable/ic_cover_36dp"
         android:gravity="center"
-        android:text="@string/share_dialog_edit_cover"
+        android:text="@string/uikit_home_edit_cover"
         app:layout_constraintBottom_toTopOf="@id/btn_shareDialog_exportPdf"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintRight_toLeftOf="@id/videoShareDialogPreview"
@@ -111,7 +111,7 @@
         android:drawablePadding="8dp"
         android:drawableTop="@drawable/ic_print_36dp"
         android:gravity="center"
-        android:text="@string/share_dialog_print"
+        android:text="@string/uikit_edit_print"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintRight_toLeftOf="@id/videoShareDialogPreview"
         app:layout_constraintTop_toBottomOf="@id/btn_shareDialog_exportPdf" />

+ 3 - 3
src/main/res/layout/fragment_music_edit_dialog.xml

@@ -103,7 +103,7 @@
         android:layout_height="wrap_content"
         android:layout_marginStart="40dp"
         android:layout_marginTop="34dp"
-        android:text="@string/volume"
+        android:text="@string/uikit_edit_volume"
         android:textColor="#80000000"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintTop_toBottomOf="@+id/editAudioTrackView" />
@@ -145,7 +145,7 @@
         android:layout_marginEnd="24dp"
         android:layout_marginBottom="24dp"
         android:background="@null"
-        android:text="@string/save"
+        android:text="@string/uikit_edit_save"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintRight_toRightOf="parent"
         app:layout_constraintTop_toTopOf="parent" />
@@ -159,7 +159,7 @@
         android:layout_marginEnd="104dp"
         android:layout_marginBottom="24dp"
         android:background="@null"
-        android:text="@string/cancel"
+        android:text="@string/uikit_edit_cancel"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintRight_toRightOf="parent"
         app:layout_constraintTop_toTopOf="parent" />

+ 4 - 4
src/main/res/layout/movie_edit_btn_panel_view.xml

@@ -19,7 +19,7 @@
         android:id="@+id/loopText"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:text="@string/loop"
+        android:text="@string/uikit_edit_loop"
         android:textColor="@android:color/white"
         android:visibility="gone"
         app:layout_constraintBottom_toBottomOf="@+id/loopSwitch"
@@ -35,7 +35,7 @@
         android:drawableStart="@drawable/ic_delete_w"
         android:paddingLeft="16dp"
         android:paddingRight="16dp"
-        android:text="@string/delete"
+        android:text="@string/uikit_home_delete"
         android:textColor="@android:color/white"
         android:visibility="gone"
         app:layout_constraintBottom_toBottomOf="parent"
@@ -69,7 +69,7 @@
         android:drawableStart="@drawable/ic_music"
         android:paddingLeft="16dp"
         android:paddingRight="16dp"
-        android:text="@string/add_music"
+        android:text="@string/uikit_edit_add_music"
         android:textSize="14sp"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintRight_toLeftOf="@+id/save"
@@ -84,7 +84,7 @@
         android:drawableStart="@drawable/ic_save"
         android:paddingLeft="16dp"
         android:paddingRight="16dp"
-        android:text="@string/save_and_share"
+        android:text="@string/uikit_edit_save_share"
         android:textSize="14sp"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintRight_toRightOf="parent"

+ 2 - 2
src/main/res/layout/view_back_cover_editor.xml

@@ -43,7 +43,7 @@
         android:layout_height="wrap_content"
         android:layout_marginTop="28dp"
         android:layout_marginBottom="24dp"
-        android:text="@string/front_cover_editor_dialog_save_btn"
+        android:text="@string/uikit_edit_save"
         android:textColor="@color/cocoa"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintRight_toRightOf="parent" />
@@ -53,7 +53,7 @@
         style="@style/Widget.AppCompat.Button.Borderless.Colored"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:text="@string/front_cover_editor_dialog_cancel_btn"
+        android:text="@string/uikit_edit_cancel"
         android:textColor="@color/cocoa"
         app:layout_constraintBottom_toBottomOf="@id/btn_backCoverEditor_save"
         app:layout_constraintRight_toLeftOf="@id/btn_backCoverEditor_save"

+ 1 - 1
src/main/res/layout/view_control_dialogue_dialog.xml

@@ -150,6 +150,6 @@
             android:layout_marginBottom="20dp"
             android:layout_marginLeft="16dp"
             android:background="#ffffff"
-            android:text="@string/delete"/>
+            android:text="@string/uikit_home_delete"/>
     </LinearLayout>
 </android.support.constraint.ConstraintLayout>

+ 1 - 1
src/main/res/layout/view_edit_scene.xml

@@ -60,7 +60,7 @@
         android:drawableLeft="@drawable/ic_delete_w"
         android:paddingLeft="16dp"
         android:paddingRight="16dp"
-        android:text="@string/delete"
+        android:text="@string/uikit_home_delete"
         android:textAllCaps="true"
         android:textColor="#ffffff"
         app:layout_constraintBottom_toBottomOf="parent"

+ 3 - 3
src/main/res/layout/view_front_cover_editor.xml

@@ -85,7 +85,7 @@
         android:layout_width="0dp"
         android:layout_height="56dp"
         android:layout_marginTop="24dp"
-        android:hint="@string/front_cover_editor_dialog_author_hint"
+        android:hint="@string/uikit_edit_author"
         app:layout_constraintLeft_toLeftOf="@id/et_frontCoverEditor_projectName"
         app:layout_constraintRight_toRightOf="@id/et_frontCoverEditor_projectName"
         app:layout_constraintTop_toBottomOf="@id/et_frontCoverEditor_projectName" />
@@ -116,7 +116,7 @@
         android:layout_height="wrap_content"
         android:layout_marginTop="28dp"
         android:layout_marginBottom="24dp"
-        android:text="@string/front_cover_editor_dialog_save_btn"
+        android:text="@string/uikit_edit_save"
         android:textColor="@color/cocoa"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintRight_toRightOf="parent"
@@ -138,7 +138,7 @@
         style="@style/Widget.AppCompat.Button.Borderless.Colored"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:text="@string/front_cover_editor_dialog_cancel_btn"
+        android:text="@string/uikit_edit_cancel"
         android:textColor="@color/cocoa"
         app:layout_constraintBottom_toBottomOf="@id/btn_frontCoverEditor_chooseScene"
         app:layout_constraintRight_toLeftOf="@id/btn_frontCoverEditor_chooseScene"

+ 3 - 3
src/main/res/layout/view_front_cover_scene_chooser.xml

@@ -20,7 +20,7 @@
 
     <TextView
         android:id="@+id/tv_frontCoverSceneChooserDialog_title"
-        android:text="@string/front_cover_scene_choose_dialog_title"
+        android:text="@string/uikit_edit_choose_a_scene_as_the_front_cover"
         android:fontFamily="sans-serif"
         android:gravity="center"
         android:textColor="#de000000"
@@ -113,7 +113,7 @@
         android:layout_height="wrap_content"
         android:layout_marginTop="28dp"
         android:layout_marginBottom="24dp"
-        android:text="@string/front_cover_scene_choose_dialog_btn_apply"
+        android:text="@string/uikit_edit_discard"
         android:textColor="@color/cocoa"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintRight_toRightOf="@id/recyclerView_frontCoverSceneChooserDialog_sceneList"
@@ -124,7 +124,7 @@
         style="@style/Widget.AppCompat.Button.Borderless.Colored"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:text="@string/front_cover_scene_choose_dialog_btn_discard"
+        android:text="@string/uikit_edit_discard"
         android:textColor="@color/cocoa"
         app:layout_constraintBottom_toBottomOf="@id/btn_frontCoverSceneChooserDialog_apply"
         app:layout_constraintRight_toLeftOf="@id/btn_frontCoverSceneChooserDialog_apply"

+ 4 - 50
src/main/res/values/strings.xml

@@ -7,73 +7,27 @@
     <!-- TODO: Remove or change this placeholder text -->
     <string name="hello_blank_fragment">Hello blank fragment</string>
 
-    <string name="share_dialog_edit_cover">Edit Cover</string>
-    <string name="share_dialog_export_pdf">Export PDF</string>
-    <string name="share_dialog_print">Print</string>
-
-    <string name="export_pdf_dialog_title">Choose PDF format</string>
-    <string name="export_pdf_dialog_radio_standard">Standard PDF</string>
-    <string name="export_pdf_dialog_radio_foldable_booklet">Foldable Booklet</string>
-    <string name="export_pdf_dialog_print">Print</string>
-    <string name="export_pdf_dialog_cancel">Cancel</string>
-
-    <string name="share_dialog_upload_suc">Upload success!</string>
-    <string name="share_dialog_upload_failed">Upload failed</string>
-
-    <string name="cover_editor_dialog_tab_front">Front Cover</string>
-    <string name="cover_editor_dialog_tab_back">Back Cover</string>
+    <string name="share_dialog_export_pdf" translatable="false">@string/uikit_edit_export_pdf</string>
+    <string name="export_pdf_dialog_radio_foldable_booklet" translatable="false">@string/uikit_edit_foldable_storybook</string>
     <string name="front_cover_editor_dialog_project_name_hint">(Project) Story Name</string>
-    <string name="front_cover_editor_dialog_author_hint">Author</string>
-    <string name="front_cover_editor_dialog_save_btn">Save</string>
     <string name="front_cover_editor_dialog_choose_a_scene_btn">Choose a scene</string>
-    <string name="front_cover_editor_dialog_cancel_btn">Cancel</string>
     <string name="front_cover_editor_dialog_duplicated_story_name_msg">Story name already exist.</string>
     <string name="front_cover_editor_dialog_empty_story_name_msg">Please enter story name.</string>
-
-    <string name="category_item_daily">Daily</string>
-    <string name="category_item_human_relations">Human relations</string>
-    <string name="category_item_character">Character</string>
-    <string name="category_item_ispirational">Ispirational</string>
-    <string name="category_item_knowledge">Knowledge</string>
-    <string name="category_item_natural">Natural</string>
-    <string name="category_item_environmental_protection">Environmental protection</string>
-    <string name="category_item_imagine">Imagine</string>
-    <string name="category_item_life">Life</string>
-    <string name="category_item_culture">Culture</string>
-    <string name="category_item_fables">Fables</string>
-    <string name="category_item_others">Others</string>
-
-    <string name="export_pdf_complete_dialog_msg">Complete</string>
     <string name="export_pdf_complete_dialog_positive">View</string>
     <string name="share_pdf_failed_no_app">No app can view pdf file.</string>
 
-    <string name="front_cover_scene_choose_dialog_title">Choose a scene as the front cover</string>
-    <string name="front_cover_scene_choose_dialog_btn_apply">Apply</string>
-    <string name="front_cover_scene_choose_dialog_btn_discard">Discard</string>
-    <string name="front_cover_scene_choose_dialog_align_center">Align to center</string>
-    <string name="front_cover_scene_choose_dialog_align_left">Align to left</string>
-    <string name="front_cover_scene_choose_dialog_align_right">Align to right</string>
-
     <!--music select dialog-->
     <string name="library">Library</string>
-    <string name="device">Device</string>
 
     <!--movie edit button panel-->
-    <string name="loop">Loop</string>
-    <string name="delete">Delete</string>
-    <string name="edit">Edit</string>
-    <string name="add_music">Add Music</string>
-    <string name="save_and_share">Save&amp;Share</string>
 
+    <string name="edit">Edit</string>
     <!--movie edit activity-->
     <string name="progressing">Progressing</string>
 
     <!--music edit dialog-->
     <string name="music_length">Music Length: %1$s</string>
-    <string name="volume">Volume</string>
     <string name="volume_percentage">%1$d %%</string>
-    <string name="save">Save</string>
-    <string name="cancel">Cancel</string>
 
     <!--share dialog-->
     <string name="preview_progress_time">%1$s/%2$s</string>
@@ -94,7 +48,7 @@
     <string name="next_scene">Next Scene</string>
     <string name="replace">Replace</string>
     <string name="color">Color</string>
-    <string name="new_page">new</string>
+    <string name="new_page">New</string>
     <string name="theme_name">Theme Name</string>
     <string name="ok">OK</string>
     <string name="project_name">Project Name</string>