Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8af68383 authored by Aayush Gupta's avatar Aayush Gupta
Browse files

Merge branch '5374-translatable_toast_strings' into 'master'

Move all toast message to strings.xml so that they can be translated

See merge request !87
parents 62a803f4 2149c94f
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -250,7 +250,7 @@ public class WeatherPreferences extends PreferenceActivity implements
        if (requestCode == 203) {
            LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
            if (!lm.isProviderEnabled(LocationManager.NETWORK_PROVIDER)) {
                Toast.makeText(this, "Set custom location in weather wettings.",
                Toast.makeText(this, getString(R.string.toast_custom_location),
                        Toast.LENGTH_SHORT).show();
            } else {
                startService(new Intent(this, WeatherUpdateService.class)
+2 −1
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ import android.util.Log
import android.view.WindowManager
import android.widget.Toast
import androidx.core.app.ActivityCompat
import foundation.e.blisslauncher.R
import foundation.e.blisslauncher.core.Utilities
import foundation.e.blisslauncher.core.runOnMainThread
import foundation.e.blisslauncher.core.safeForEach
@@ -124,7 +125,7 @@ class BlurWallpaperProvider(val context: Context) {
            } else {
                if (error is OutOfMemoryError) {
                    runOnMainThread {
                        Toast.makeText(context, "Failed", Toast.LENGTH_LONG).show()
                        Toast.makeText(context, context.getString(R.string.toast_failed), Toast.LENGTH_LONG).show()
                        notifyWallpaperChanged()
                    }
                }
+7 −7
Original line number Diff line number Diff line
@@ -611,7 +611,7 @@ public class LauncherActivity extends AppCompatActivity implements
        moveTo = -1;
        updateOrAddShortcut(shortcutAddEvent.getShortcutItem());
        DatabaseManager.getManager(this).saveLayouts(pages, mDock);
        Toast.makeText(this, "Shortcut has been added", Toast.LENGTH_SHORT).show();
        Toast.makeText(this, getString(R.string.toast_shortcut_added), Toast.LENGTH_SHORT).show();
        if (moveTo != -1) {
            mHorizontalPager.setCurrentPage(moveTo);
            moveTo = -1;
@@ -1075,7 +1075,7 @@ public class LauncherActivity extends AppCompatActivity implements

                            @Override
                            public void onError(Throwable e) {
                                Toast.makeText(LauncherActivity.this, "Recreating Launcher",
                                Toast.makeText(LauncherActivity.this, getString(R.string.toast_recreating_launcher),
                                        Toast.LENGTH_SHORT).show();
                                e.printStackTrace();
                                recreate();
@@ -1566,7 +1566,7 @@ public class LauncherActivity extends AppCompatActivity implements
        if (requestCode == REQUEST_LOCATION_SOURCE_SETTING) {
            LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
            if (!lm.isProviderEnabled(LocationManager.NETWORK_PROVIDER)) {
                Toast.makeText(this, "Set custom location in weather settings.",
                Toast.makeText(this, getString(R.string.toast_custom_location),
                        Toast.LENGTH_SHORT).show();
            } else {
                startService(new Intent(this, WeatherUpdateService.class)
@@ -1826,7 +1826,7 @@ public class LauncherActivity extends AppCompatActivity implements
        } else {
            ApplicationItem applicationItem = (ApplicationItem) launcherItem;
            if (applicationItem.isDisabled) {
                Toast.makeText(this, "Package not available or disabled", Toast.LENGTH_SHORT).show();
                Toast.makeText(this, getString(R.string.toast_package_unavailable), Toast.LENGTH_SHORT).show();
            } else {
                if (user == null || user.equals(Process.myUserHandle())) {
                    context.startActivity(intent);
@@ -2003,7 +2003,7 @@ public class LauncherActivity extends AppCompatActivity implements
                    // System applications cannot be installed. For now, show a toast explaining
                    // that.
                    // We may give them the option of disabling apps this way.
                    Toast.makeText(this, "Can not uninstall this app", Toast.LENGTH_SHORT).show();
                    Toast.makeText(this, getString(R.string.toast_cannot_uninstall), Toast.LENGTH_SHORT).show();
                } else {
                    Uri packageUri = Uri.fromParts("package", componentName.getPackageName(),
                            componentName.getClassName());
@@ -2191,7 +2191,7 @@ public class LauncherActivity extends AppCompatActivity implements
                            if (movingApp.getParent() == null) {
                                if (mDock.getChildCount() >= mDeviceProfile.numColumns) {
                                    Toast.makeText(LauncherActivity.this,
                                            "Dock is already full",
                                            getString(R.string.toast_dock_full),
                                            Toast.LENGTH_SHORT).show();
                                } else {
                                    addAppToDock(movingApp, EMPTY_LOCATION_DRAG);
@@ -2487,7 +2487,7 @@ public class LauncherActivity extends AppCompatActivity implements
    private void removeAppFromFolder() {
        if (pages.get(getCurrentAppsPageNumber()).getChildCount()
                >= mDeviceProfile.maxAppsPerPage) {
            Toast.makeText(this, "No more room in page", Toast.LENGTH_SHORT).show();
            Toast.makeText(this, getString(R.string.toast_no_room), Toast.LENGTH_SHORT).show();
            movingApp.setVisibility(View.VISIBLE);
            int currentItem = mFolderAppsViewPager.getCurrentItem();
            makeAppWobble(movingApp, true,
+1 −1
Original line number Diff line number Diff line
@@ -207,7 +207,7 @@ public class WidgetPicker extends Activity implements WidgetPickerAdapter.OnClic
            if (resultCode == RESULT_OK) {
                setResultData(RESULT_OK, null);
            } else {
                Toast.makeText(this, "Permission denied", Toast.LENGTH_SHORT).show();
                Toast.makeText(this, getString(R.string.toast_permission_denied), Toast.LENGTH_SHORT).show();
                setResultData(RESULT_CANCELED, null);
            }

+10 −0
Original line number Diff line number Diff line
@@ -177,4 +177,14 @@
    <string name="uninstall_shortcut_dialog">Do you want to uninstall this shortcut?</string>
    <string name="ok">ok</string>
    <string name="widget_is_not_resizable">Widget is not resizable</string>

    <string name="toast_permission_denied">Permission denied</string>
    <string name="toast_custom_location">Set custom location in weather settings.</string>
    <string name="toast_failed">Failed to set blur wallpaper</string>
    <string name="toast_shortcut_added">Shortcut has been added</string>
    <string name="toast_recreating_launcher">Recreating Launcher</string>
    <string name="toast_package_unavailable">Package not available or disabled</string>
    <string name="toast_cannot_uninstall">Can not uninstall this app</string>
    <string name="toast_dock_full">Dock is already full</string>
    <string name="toast_no_room">No more room in page</string>
</resources>