From 413eed3329927d8bc5c3101b9911a3b0fd626071 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 11 Oct 2016 21:14:15 +0200 Subject: [PATCH] couple more resourec edits here and there --- .../filemanager/activities/AboutActivity.java | 6 ++--- .../filemanager/fragments/ItemsFragment.java | 16 ++++++------- .../filemanager/adapters/ItemsAdapter.kt | 2 +- .../filemanager/dialogs/PropertiesDialog.kt | 2 +- app/src/main/res/layout/copy_item.xml | 2 +- .../filepicker}/dialogs/SelectFolderDialog.kt | 23 ++++++++++--------- library/src/main/res/values-de/strings.xml | 1 - library/src/main/res/values-it/strings.xml | 1 - library/src/main/res/values-ja/strings.xml | 1 - .../src/main/res/values-pt-rPT/strings.xml | 1 - library/src/main/res/values-sv/strings.xml | 1 - library/src/main/res/values/strings.xml | 1 - 12 files changed, 26 insertions(+), 31 deletions(-) rename {app/src/main/kotlin/com/simplemobiletools/filemanager => library/src/main/kotlin/com/simplemobiletools/filepicker}/dialogs/SelectFolderDialog.kt (83%) diff --git a/app/src/main/java/com/simplemobiletools/filemanager/activities/AboutActivity.java b/app/src/main/java/com/simplemobiletools/filemanager/activities/AboutActivity.java index 58922ad9..d882e12e 100644 --- a/app/src/main/java/com/simplemobiletools/filemanager/activities/AboutActivity.java +++ b/app/src/main/java/com/simplemobiletools/filemanager/activities/AboutActivity.java @@ -41,7 +41,7 @@ public class AboutActivity extends SimpleActivity { private void setupEmail() { final String email = mRes.getString(R.string.email); - final String appName = mRes.getString(R.string.smtfp_app_name); + final String appName = mRes.getString(R.string.app_name); final String href = "" + email + ""; mEmailTV.setText(Html.fromHtml(href)); mEmailTV.setMovementMethod(LinkMovementMethod.getInstance()); @@ -63,9 +63,9 @@ public class AboutActivity extends SimpleActivity { @OnClick(R.id.about_invite) public void inviteFriend() { final Intent intent = new Intent(); - final String text = String.format(getString(R.string.share_text), getString(R.string.smtfp_app_name), getStoreUrl()); + final String text = String.format(getString(R.string.share_text), getString(R.string.app_name), getStoreUrl()); intent.setAction(Intent.ACTION_SEND); - intent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.smtfp_app_name)); + intent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.app_name)); intent.putExtra(Intent.EXTRA_TEXT, text); intent.setType("text/plain"); startActivity(Intent.createChooser(intent, getString(R.string.invite_via))); diff --git a/app/src/main/java/com/simplemobiletools/filemanager/fragments/ItemsFragment.java b/app/src/main/java/com/simplemobiletools/filemanager/fragments/ItemsFragment.java index e32865be..f1cb2b4d 100644 --- a/app/src/main/java/com/simplemobiletools/filemanager/fragments/ItemsFragment.java +++ b/app/src/main/java/com/simplemobiletools/filemanager/fragments/ItemsFragment.java @@ -38,7 +38,7 @@ import com.simplemobiletools.filemanager.Utils; import com.simplemobiletools.filemanager.adapters.ItemsAdapter; import com.simplemobiletools.filemanager.asynctasks.CopyTask; import com.simplemobiletools.filemanager.dialogs.PropertiesDialog; -import com.simplemobiletools.filemanager.dialogs.SelectFolderDialog; +import com.simplemobiletools.filepicker.dialogs.SelectFolderDialog; import com.simplemobiletools.filepicker.models.FileDirItem; import java.io.File; @@ -215,8 +215,8 @@ public class ItemsFragment extends android.support.v4.app.Fragment final AlertDialog.Builder builder = new AlertDialog.Builder(getContext()); builder.setTitle(getResources().getString(R.string.create_new)); builder.setView(newItemView); - builder.setPositiveButton(R.string.smtfp_ok, null); - builder.setNegativeButton(R.string.smtfp_cancel, null); + builder.setPositiveButton(R.string.ok, null); + builder.setNegativeButton(R.string.cancel, null); final AlertDialog alertDialog = builder.create(); alertDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE); @@ -394,8 +394,8 @@ public class ItemsFragment extends android.support.v4.app.Fragment final AlertDialog.Builder builder = new AlertDialog.Builder(getContext()); builder.setTitle(getResources().getString(title)); builder.setView(renameView); - builder.setPositiveButton(R.string.smtfp_ok, null); - builder.setNegativeButton(R.string.smtfp_cancel, null); + builder.setPositiveButton(R.string.ok, null); + builder.setNegativeButton(R.string.cancel, null); final AlertDialog alertDialog = builder.create(); alertDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE); @@ -445,8 +445,8 @@ public class ItemsFragment extends android.support.v4.app.Fragment final AlertDialog.Builder builder = new AlertDialog.Builder(getContext()); builder.setTitle(getResources().getString(copyString)); builder.setView(copyView); - builder.setPositiveButton(R.string.smtfp_ok, null); - builder.setNegativeButton(R.string.smtfp_cancel, null); + builder.setPositiveButton(R.string.ok, null); + builder.setNegativeButton(R.string.cancel, null); mCopyDialog = builder.create(); mCopyDialog.show(); @@ -454,7 +454,7 @@ public class ItemsFragment extends android.support.v4.app.Fragment @Override public void onClick(View v) { final String destinationPath = mDestinationView.getText().toString().trim(); - if (destinationPath.equals(getResources().getString(R.string.smtfp_select_destination))) { + if (destinationPath.equals(getResources().getString(R.string.select_destination))) { Utils.showToast(getContext(), R.string.please_select_destination); return; } diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt index f753ec03..05d14122 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt @@ -56,7 +56,7 @@ class ItemsAdapter(context: Context, private val mItems: List) : Ba private fun getChildrenCnt(item: FileDirItem): String { val children = item.children - return mRes.getQuantityString(R.plurals.smtfp_items, children, children) + return mRes.getQuantityString(R.plurals.items, children, children) } override fun getCount(): Int { diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/dialogs/PropertiesDialog.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/dialogs/PropertiesDialog.kt index 2e47ec6b..493df67f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/dialogs/PropertiesDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/dialogs/PropertiesDialog.kt @@ -37,7 +37,7 @@ class PropertiesDialog : DialogFragment() { val builder = AlertDialog.Builder(context) builder.setTitle(resources.getString(title)) builder.setView(infoView) - builder.setPositiveButton(R.string.smtfp_ok, null) + builder.setPositiveButton(R.string.ok, null) return builder.create() } diff --git a/app/src/main/res/layout/copy_item.xml b/app/src/main/res/layout/copy_item.xml index 2824c599..11e3e53d 100644 --- a/app/src/main/res/layout/copy_item.xml +++ b/app/src/main/res/layout/copy_item.xml @@ -42,7 +42,7 @@ android:paddingBottom="@dimen/smtfp_small_margin" android:paddingRight="@dimen/smtfp_small_margin" android:paddingTop="@dimen/smtfp_small_margin" - android:text="@string/smtfp_select_destination"/> + android:text="@string/select_destination"/> { - val showHidden = Config.newInstance(context).showHidden + val showHidden = false//Config.newInstance(context).showHidden val items = ArrayList() val base = File(path) val files = base.listFiles() @@ -98,7 +99,7 @@ class SelectFolderDialog : DialogFragment() { continue val curPath = file.absolutePath - val curName = Utils.getFilename(curPath) + val curName = curPath.getFilenameFromPath() val size = file.length() items.add(FileDirItem(curPath, curName, file.isDirectory, getChildren(file), size)) diff --git a/library/src/main/res/values-de/strings.xml b/library/src/main/res/values-de/strings.xml index bc2fb162..dfe6198c 100644 --- a/library/src/main/res/values-de/strings.xml +++ b/library/src/main/res/values-de/strings.xml @@ -1,5 +1,4 @@ - Simple File Picker Ziel auswählen home OK diff --git a/library/src/main/res/values-it/strings.xml b/library/src/main/res/values-it/strings.xml index 2d13ee5f..c41e3bbd 100644 --- a/library/src/main/res/values-it/strings.xml +++ b/library/src/main/res/values-it/strings.xml @@ -1,5 +1,4 @@ - Simple File Picker Seleziona destinazione home OK diff --git a/library/src/main/res/values-ja/strings.xml b/library/src/main/res/values-ja/strings.xml index f12835cf..17258e48 100644 --- a/library/src/main/res/values-ja/strings.xml +++ b/library/src/main/res/values-ja/strings.xml @@ -1,5 +1,4 @@ - Simple File Picker 宛先を選択 ホーム OK diff --git a/library/src/main/res/values-pt-rPT/strings.xml b/library/src/main/res/values-pt-rPT/strings.xml index 3f0a4d32..68ad0e49 100644 --- a/library/src/main/res/values-pt-rPT/strings.xml +++ b/library/src/main/res/values-pt-rPT/strings.xml @@ -1,5 +1,4 @@ - Simple File Picker Selecionar destino início OK diff --git a/library/src/main/res/values-sv/strings.xml b/library/src/main/res/values-sv/strings.xml index a63f2cb7..566a2267 100644 --- a/library/src/main/res/values-sv/strings.xml +++ b/library/src/main/res/values-sv/strings.xml @@ -1,5 +1,4 @@ - Simple File Picker Välj mål home OK diff --git a/library/src/main/res/values/strings.xml b/library/src/main/res/values/strings.xml index 0534a6bf..21d7a3b4 100644 --- a/library/src/main/res/values/strings.xml +++ b/library/src/main/res/values/strings.xml @@ -1,5 +1,4 @@ - Simple File Picker Select destination home OK