[Scummvm-git-logs] scummvm branch-2-7 -> 94f601061b9a4b9930f0d059aced70c3d13b6a2c
lephilousophe
noreply at scummvm.org
Sun Feb 12 16:56:05 UTC 2023
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
c7a1b3ef77 BASE: Add message for Android on startup explaining SAF
94f601061b ANDROID: Make SAF strings translatable and better looking
Commit: c7a1b3ef772d2f738397b8032f03a3baa1a7471f
https://github.com/scummvm/scummvm/commit/c7a1b3ef772d2f738397b8032f03a3baa1a7471f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-02-12T17:55:14+01:00
Commit Message:
BASE: Add message for Android on startup explaining SAF
There are two messages, for upgrade and for the new users
Changed paths:
base/main.cpp
diff --git a/base/main.cpp b/base/main.cpp
index 1725f6e7652..adf7e993e5f 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -56,6 +56,7 @@
#include "gui/gui-manager.h"
#include "gui/error.h"
+#include "gui/message.h"
#include "audio/mididrv.h"
#include "audio/musicplugin.h" /* for music manager */
@@ -92,6 +93,10 @@
#include "gui/updates-dialog.h"
#endif
+#ifdef __ANDROID__
+#include "backends/fs/android/android-fs-factory.h"
+#endif
+
static bool launcherDialog() {
// Discard any command line options. Those that affect the graphics
@@ -665,6 +670,66 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
}
#endif
+#ifdef __ANDROID__
+ if (AndroidFilesystemFactory::instance().hasSAF()
+ && !ConfMan.hasKey("android_saf_dialog_shown")) {
+
+ bool cancelled = false;
+
+ if (!ConfMan.getGameDomains().empty()) {
+ GUI::MessageDialog alert(_(
+ "In this new version of ScummVM Android, significant changes were made to "
+ "the file access system to allow support for modern versions of the Android "
+ "Operating System.\n"
+ "If you find that your existing added games or custom paths no longer work, "
+ "please edit those paths and this time use the SAF system to browse to the "
+ "desired locations.\n"
+ "To do that:\n"
+ "\n"
+ " 1. For each game whose data is not found, go to the \"Paths\" tab in "
+ "the \"Game Options\" and change the \"Game path\"\n"
+ " 2. Inside the ScummVM file browser, use \"Go Up\" until you reach "
+ "the \"root\" folder where you will see the \"<Add SAF node>\" option.\n"
+ " 3. Choose that, then browse and select the \"parent\" folder for your "
+ "games subfolders, e.g. \"SD Card > myGames\". Click on \"Use this folder\".\n"
+ " 4. Then, a new folder \"myGames\" will appear on the \"root\" folder "
+ "of the ScummVM browser.\n"
+ " 5. Browse through this folder to your game data.\n"
+ "\n"
+ "Steps 2 and 3 need to be done only once for all of your games."
+ ), _("Ok"),
+ // I18N: A button caption to dismiss amessage and read it later
+ _("Read Later"), Graphics::kTextAlignLeft);
+
+ if (alert.runModal() != GUI::kMessageOK)
+ cancelled = true;
+ } else {
+ GUI::MessageDialog alert(_(
+ "In this new version of ScummVM Android, significant changes were made to "
+ "the file access system to allow support for modern versions of the Android "
+ "Operating System.\n"
+ "Thus, you need to set up SAF in order to be able to add the games.\n"
+ "\n"
+ " 1. Inside the ScummVM file browser, use \"Go Up\" until you reach "
+ "the \"root\" folder where you will see the \"<Add SAF node>\" option.\n"
+ " 2. Choose that, then browse and select the \"parent\" folder for your "
+ "games subfolders, e.g. \"SD Card > myGames\". Click on \"Use this folder\".\n"
+ " 3. Then, a new folder \"myGames\" will appear on the \"root\" folder "
+ "of the ScummVM browser.\n"
+ " 4. Browse through this folder to your game data."
+ ), _("Ok"),
+ // I18N: A button caption to dismiss a message and read it later
+ _("Read Later"), Graphics::kTextAlignLeft);
+
+ if (alert.runModal() != GUI::kMessageOK)
+ cancelled = true;
+ }
+
+ if (!cancelled)
+ ConfMan.setBool("android_saf_dialog_shown", true);
+ }
+#endif
+
#if defined(USE_CLOUD) && defined(USE_LIBCURL)
CloudMan.init();
CloudMan.syncSaves();
Commit: 94f601061b9a4b9930f0d059aced70c3d13b6a2c
https://github.com/scummvm/scummvm/commit/94f601061b9a4b9930f0d059aced70c3d13b6a2c
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2023-02-12T17:55:31+01:00
Commit Message:
ANDROID: Make SAF strings translatable and better looking
Changed paths:
backends/fs/android/android-saf-fs.cpp
backends/fs/android/android-saf-fs.h
backends/platform/android/options.cpp
po/POTFILES
diff --git a/backends/fs/android/android-saf-fs.cpp b/backends/fs/android/android-saf-fs.cpp
index 48b2f74e20e..b905386b5b0 100644
--- a/backends/fs/android/android-saf-fs.cpp
+++ b/backends/fs/android/android-saf-fs.cpp
@@ -660,7 +660,8 @@ void AddSAFFakeNode::makeProxySAF() const {
return;
}
- jobject saftree = JNI::getNewSAFTree(true, true, "", "Choose a new SAF tree");
+ // I18N: This may be displayed in the Android UI used to add a Sotrage Attach Framework authorization
+ jobject saftree = JNI::getNewSAFTree(true, true, "", _("Choose a new folder"));
if (!saftree) {
return;
}
diff --git a/backends/fs/android/android-saf-fs.h b/backends/fs/android/android-saf-fs.h
index bd82d6699b5..f6ff2690515 100644
--- a/backends/fs/android/android-saf-fs.h
+++ b/backends/fs/android/android-saf-fs.h
@@ -23,6 +23,8 @@
#define ANDROID_SAF_FILESYSTEM_H
#include <jni.h>
+
+#include "common/translation.h"
#include "backends/fs/abstract-fs.h"
/**
@@ -167,8 +169,9 @@ public:
bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const override;
- Common::U32String getDisplayName() const override { return Common::U32String("\x01" "<Add SAF node>"); };
- Common::String getName() const override { return "\x01" "<Add SAF node>"; };
+ // I18N: This is displayed in the file browser to let the user choose a new folder for Android Storage Attached Framework
+ Common::U32String getDisplayName() const override { return Common::U32String::format("\x01<%s>", _("Add a new folder").c_str()); };
+ Common::String getName() const override { return Common::String::format("\x01<%s>", _("Add a new folder").encode().c_str()); };
Common::String getPath() const override;
bool isDirectory() const override { return true; }
diff --git a/backends/platform/android/options.cpp b/backends/platform/android/options.cpp
index 24439cda053..75a03f77d4b 100644
--- a/backends/platform/android/options.cpp
+++ b/backends/platform/android/options.cpp
@@ -149,7 +149,8 @@ AndroidOptionsWidget::AndroidOptionsWidget(GuiObject *boss, const Common::String
if (inAppDomain && AndroidFilesystemFactory::instance().hasSAF()) {
// Only show this checkbox in Options (via Options... in the launcher), and not at game domain level (via Edit Game...)
- (new GUI::ButtonWidget(widgetsBoss(), "AndroidOptionsDialog.ForgetSAFButton", _("Forget SAF authorization"), Common::U32String(), kRemoveCmd))->setTarget(this);
+ // I18N: This button opens a list of all folders added for Android Storage Attached Framework
+ (new GUI::ButtonWidget(widgetsBoss(), "AndroidOptionsDialog.ForgetSAFButton", _("Remove folder authorizations..."), Common::U32String(), kRemoveCmd))->setTarget(this);
}
}
diff --git a/po/POTFILES b/po/POTFILES
index 8c5a992cbaa..e6deb0d17f5 100644
--- a/po/POTFILES
+++ b/po/POTFILES
@@ -70,6 +70,8 @@ backends/events/default/default-events.cpp
backends/events/gph/gph-events.cpp
backends/events/maemosdl/maemosdl-events.cpp
backends/events/openpandora/op-events.cpp
+backends/fs/android/android-saf-fs.cpp
+backends/fs/android/android-saf-fs.h
backends/graphics/opengl/opengl-graphics.cpp
backends/graphics/openglsdl/openglsdl-graphics.cpp
backends/graphics/surfacesdl/surfacesdl-graphics.cpp
More information about the Scummvm-git-logs
mailing list