Skip to content

Commit 413eed3

Browse files
committed
couple more resourec edits here and there
1 parent 727acce commit 413eed3

File tree

12 files changed

+26
-31
lines changed

12 files changed

+26
-31
lines changed

app/src/main/java/com/simplemobiletools/filemanager/activities/AboutActivity.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ protected void onCreate(Bundle savedInstanceState) {
4141

4242
private void setupEmail() {
4343
final String email = mRes.getString(R.string.email);
44-
final String appName = mRes.getString(R.string.smtfp_app_name);
44+
final String appName = mRes.getString(R.string.app_name);
4545
final String href = "<a href=\"mailto:" + email + "?subject=" + appName + "\">" + email + "</a>";
4646
mEmailTV.setText(Html.fromHtml(href));
4747
mEmailTV.setMovementMethod(LinkMovementMethod.getInstance());
@@ -63,9 +63,9 @@ private void setupRateUs() {
6363
@OnClick(R.id.about_invite)
6464
public void inviteFriend() {
6565
final Intent intent = new Intent();
66-
final String text = String.format(getString(R.string.share_text), getString(R.string.smtfp_app_name), getStoreUrl());
66+
final String text = String.format(getString(R.string.share_text), getString(R.string.app_name), getStoreUrl());
6767
intent.setAction(Intent.ACTION_SEND);
68-
intent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.smtfp_app_name));
68+
intent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.app_name));
6969
intent.putExtra(Intent.EXTRA_TEXT, text);
7070
intent.setType("text/plain");
7171
startActivity(Intent.createChooser(intent, getString(R.string.invite_via)));

app/src/main/java/com/simplemobiletools/filemanager/fragments/ItemsFragment.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
import com.simplemobiletools.filemanager.adapters.ItemsAdapter;
3939
import com.simplemobiletools.filemanager.asynctasks.CopyTask;
4040
import com.simplemobiletools.filemanager.dialogs.PropertiesDialog;
41-
import com.simplemobiletools.filemanager.dialogs.SelectFolderDialog;
41+
import com.simplemobiletools.filepicker.dialogs.SelectFolderDialog;
4242
import com.simplemobiletools.filepicker.models.FileDirItem;
4343

4444
import java.io.File;
@@ -215,8 +215,8 @@ public void fabClicked(View view) {
215215
final AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
216216
builder.setTitle(getResources().getString(R.string.create_new));
217217
builder.setView(newItemView);
218-
builder.setPositiveButton(R.string.smtfp_ok, null);
219-
builder.setNegativeButton(R.string.smtfp_cancel, null);
218+
builder.setPositiveButton(R.string.ok, null);
219+
builder.setNegativeButton(R.string.cancel, null);
220220

221221
final AlertDialog alertDialog = builder.create();
222222
alertDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
@@ -394,8 +394,8 @@ private void displayRenameDialog() {
394394
final AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
395395
builder.setTitle(getResources().getString(title));
396396
builder.setView(renameView);
397-
builder.setPositiveButton(R.string.smtfp_ok, null);
398-
builder.setNegativeButton(R.string.smtfp_cancel, null);
397+
builder.setPositiveButton(R.string.ok, null);
398+
builder.setNegativeButton(R.string.cancel, null);
399399

400400
final AlertDialog alertDialog = builder.create();
401401
alertDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
@@ -445,16 +445,16 @@ private void displayCopyDialog() {
445445
final AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
446446
builder.setTitle(getResources().getString(copyString));
447447
builder.setView(copyView);
448-
builder.setPositiveButton(R.string.smtfp_ok, null);
449-
builder.setNegativeButton(R.string.smtfp_cancel, null);
448+
builder.setPositiveButton(R.string.ok, null);
449+
builder.setNegativeButton(R.string.cancel, null);
450450

451451
mCopyDialog = builder.create();
452452
mCopyDialog.show();
453453
mCopyDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(new View.OnClickListener() {
454454
@Override
455455
public void onClick(View v) {
456456
final String destinationPath = mDestinationView.getText().toString().trim();
457-
if (destinationPath.equals(getResources().getString(R.string.smtfp_select_destination))) {
457+
if (destinationPath.equals(getResources().getString(R.string.select_destination))) {
458458
Utils.showToast(getContext(), R.string.please_select_destination);
459459
return;
460460
}

app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class ItemsAdapter(context: Context, private val mItems: List<FileDirItem>) : Ba
5656

5757
private fun getChildrenCnt(item: FileDirItem): String {
5858
val children = item.children
59-
return mRes.getQuantityString(R.plurals.smtfp_items, children, children)
59+
return mRes.getQuantityString(R.plurals.items, children, children)
6060
}
6161

6262
override fun getCount(): Int {

app/src/main/kotlin/com/simplemobiletools/filemanager/dialogs/PropertiesDialog.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class PropertiesDialog : DialogFragment() {
3737
val builder = AlertDialog.Builder(context)
3838
builder.setTitle(resources.getString(title))
3939
builder.setView(infoView)
40-
builder.setPositiveButton(R.string.smtfp_ok, null)
40+
builder.setPositiveButton(R.string.ok, null)
4141

4242
return builder.create()
4343
}

app/src/main/res/layout/copy_item.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
android:paddingBottom="@dimen/smtfp_small_margin"
4343
android:paddingRight="@dimen/smtfp_small_margin"
4444
android:paddingTop="@dimen/smtfp_small_margin"
45-
android:text="@string/smtfp_select_destination"/>
45+
android:text="@string/select_destination"/>
4646

4747
<RadioGroup
4848
android:id="@+id/dialog_radio_group"

app/src/main/kotlin/com/simplemobiletools/filemanager/dialogs/SelectFolderDialog.kt renamed to library/src/main/kotlin/com/simplemobiletools/filepicker/dialogs/SelectFolderDialog.kt

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.simplemobiletools.filemanager.dialogs
1+
package com.simplemobiletools.filepicker.dialogs
22

33
import android.app.Activity
44
import android.app.Dialog
@@ -7,18 +7,19 @@ import android.os.Bundle
77
import android.support.v4.app.DialogFragment
88
import android.support.v7.app.AlertDialog
99
import android.view.View
10-
import com.simplemobiletools.filemanager.Config
11-
import com.simplemobiletools.filemanager.R
12-
import com.simplemobiletools.filemanager.Utils
13-
import com.simplemobiletools.filemanager.adapters.ItemsAdapter
14-
import com.simplemobiletools.filemanager.fragments.ItemsFragment
10+
import com.simplemobiletools.filepicker.R
11+
import com.simplemobiletools.filepicker.adapters.ItemsAdapter
12+
import com.simplemobiletools.filepicker.extensions.getFilenameFromPath
1513
import com.simplemobiletools.filepicker.models.FileDirItem
16-
import kotlinx.android.synthetic.main.directory_picker.view.*
14+
import kotlinx.android.synthetic.main.smtfp_directory_picker.view.*
1715
import java.io.File
1816
import java.util.*
1917
import kotlin.comparisons.compareBy
2018

2119
class SelectFolderDialog : DialogFragment() {
20+
val SELECT_FOLDER_REQUEST = 1
21+
val SELECT_FOLDER_PATH = "path"
22+
2223
companion object {
2324
lateinit var mPath: String
2425
var mFirstUpdate: Boolean = true
@@ -71,8 +72,8 @@ class SelectFolderDialog : DialogFragment() {
7172

7273
private fun sendResult() {
7374
val intent = Intent()
74-
intent.putExtra(ItemsFragment.SELECT_FOLDER_PATH, mPath)
75-
targetFragment.onActivityResult(ItemsFragment.SELECT_FOLDER_REQUEST, Activity.RESULT_OK, intent)
75+
intent.putExtra(SELECT_FOLDER_PATH, mPath)
76+
targetFragment.onActivityResult(SELECT_FOLDER_REQUEST, Activity.RESULT_OK, intent)
7677
dismiss()
7778
}
7879

@@ -85,7 +86,7 @@ class SelectFolderDialog : DialogFragment() {
8586
}
8687

8788
private fun getItems(path: String): List<FileDirItem> {
88-
val showHidden = Config.newInstance(context).showHidden
89+
val showHidden = false//Config.newInstance(context).showHidden
8990
val items = ArrayList<FileDirItem>()
9091
val base = File(path)
9192
val files = base.listFiles()
@@ -98,7 +99,7 @@ class SelectFolderDialog : DialogFragment() {
9899
continue
99100

100101
val curPath = file.absolutePath
101-
val curName = Utils.getFilename(curPath)
102+
val curName = curPath.getFilenameFromPath()
102103
val size = file.length()
103104

104105
items.add(FileDirItem(curPath, curName, file.isDirectory, getChildren(file), size))

library/src/main/res/values-de/strings.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<resources>
2-
<string name="smtfp_app_name">Simple File Picker</string>
32
<string name="smtfp_select_destination">Ziel auswählen</string>
43
<string name="smtfp_initial_breadcrumb">home</string>
54
<string name="smtfp_ok">OK</string>

library/src/main/res/values-it/strings.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<resources>
2-
<string name="smtfp_app_name">Simple File Picker</string>
32
<string name="smtfp_select_destination">Seleziona destinazione</string>
43
<string name="smtfp_initial_breadcrumb">home</string>
54
<string name="smtfp_ok">OK</string>

library/src/main/res/values-ja/strings.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<resources>
2-
<string name="smtfp_app_name">Simple File Picker</string>
32
<string name="smtfp_select_destination">宛先を選択</string>
43
<string name="smtfp_initial_breadcrumb">ホーム</string>
54
<string name="smtfp_ok">OK</string>

library/src/main/res/values-pt-rPT/strings.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<resources>
2-
<string name="smtfp_app_name">Simple File Picker</string>
32
<string name="smtfp_select_destination">Selecionar destino</string>
43
<string name="smtfp_initial_breadcrumb">início</string>
54
<string name="smtfp_ok">OK</string>

0 commit comments

Comments
 (0)