Browse Source

Merge branch 'master' with updated translation into dev

pull/177/head
Eric Kok 10 years ago
parent
commit
11259b5189
  1. 10
      app/src/main/java/org/transdroid/core/app/settings/ApplicationSettings.java
  2. 5
      app/src/main/java/org/transdroid/core/gui/DetailsFragment.java
  3. 4
      app/src/main/res/values-ru/strings.xml

10
app/src/main/java/org/transdroid/core/app/settings/ApplicationSettings.java

@ -151,6 +151,16 @@ public class ApplicationSettings { @@ -151,6 +151,16 @@ public class ApplicationSettings {
String localPort = prefs.getString("server_localport_" + order, "");
if (localPort.equals(""))
localPort = port; // Default to the normal (non-local) port
try {
Integer.parseInt(port);
} catch (NumberFormatException e) {
port = Integer.toString(Daemon.getDefaultPortNumber(type, ssl));
}
try {
Integer.parseInt(localPort);
} catch (NumberFormatException e) {
localPort = port;
}
return new ServerSetting(order,
prefs.getString("server_name_" + order, null),

5
app/src/main/java/org/transdroid/core/gui/DetailsFragment.java

@ -447,12 +447,15 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen @@ -447,12 +447,15 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
andftpStart.putExtra("local_folder", "/sdcard/Download");
for (int f = 0; f < checked.size(); f++) {
String file = checked.get(f).getRelativePath();
// If the file is directly in the root, AndFTP fails if we supply the proper path (like /file.pdf)
if (file != null) {
// If the file is directly in the root, AndFTP fails if we supply the proper path (like
// /file.pdf)
// Work around this bug by removing the leading / if no further directories are used in the path
if (file.startsWith("/") && file.indexOf("/", 1) < 0)
file = file.substring(1);
andftpStart.putExtra("remote_file" + (f + 1), file);
}
}
if (andftpStart.resolveActivity(getActivity().getPackageManager()) != null) {
startActivity(andftpStart);
mode.finish();

4
app/src/main/res/values-ru/strings.xml

@ -277,8 +277,8 @@ along with Transdroid. If not, see <http://www.gnu.org/licenses/>. @@ -277,8 +277,8 @@ along with Transdroid. If not, see <http://www.gnu.org/licenses/>.
<string name="pref_import">Импортировать настройки</string>
<string name="pref_import_dialog">%1$s импорт настроек сервера, веб-поиска, RSS и системы из %2$s</string>
<string name="pref_import_success">Настройки успешно импортированы</string>
<string name="pref_export">Настройки экспорта</string>
<string name="pref_export_dialog">%1$s экспорт настроек сервера (включая пароли), веб-поиска, RSS и системы в текст файл JSON :%2$s</string>
<string name="pref_export">Экспортировать настройки</string>
<string name="pref_export_dialog">%1$s экспорт настроек сервера (включая пароли), веб-поиска, RSS и системы в текстовый файл JSON :%2$s</string>
<string name="pref_export_success">Настройки успешно экспортированы</string>
<string name="pref_help">Помощь</string>

Loading…
Cancel
Save