removed unused preferences

updated i18n
This commit is contained in:
Mariotaku Lee 2016-02-21 18:43:05 +08:00
parent 049b0ccc19
commit 6c582e6966
111 changed files with 90 additions and 232 deletions

View File

@ -50,7 +50,7 @@ android {
}
sourceSets {
main {
// res.srcDirs += project.files("src/$name/res-localized")
res.srcDirs += project.files("src/$name/res-localized")
res.srcDirs += project.files("src/$name/res-svg2png")
}
}

View File

@ -21,6 +21,7 @@ package edu.tsinghua.hotmobi;
import android.content.Context;
import android.content.SharedPreferences;
import android.net.Uri;
import android.util.Log;
import org.mariotaku.restfu.RestFuUtils;
@ -67,6 +68,14 @@ public class UploadLogsTask implements Runnable {
}
}
try {
context.getContentResolver().call(Uri.parse("content://edu.tsinghua.research.steel"),
"upload_logs", null, null);
} catch (Exception e) {
if (BuildConfig.DEBUG) {
Log.w(HotMobiLogger.LOGTAG, e);
}
}
if (uploadLogs()) {
prefs.edit().putLong(HotMobiConstants.KEY_LAST_UPLOAD_TIME, System.currentTimeMillis()).apply();
}

View File

@ -58,7 +58,6 @@ import android.view.Window;
import android.view.WindowManager;
import android.widget.FrameLayout;
import android.widget.FrameLayout.LayoutParams;
import android.widget.Toast;
import com.desmond.asyncmanager.AsyncManager;
import com.desmond.asyncmanager.TaskRunnable;
@ -116,7 +115,6 @@ import static org.mariotaku.twidere.util.CompareUtils.classEquals;
import static org.mariotaku.twidere.util.DataStoreUtils.cleanDatabasesByItemLimit;
import static org.mariotaku.twidere.util.Utils.getDefaultAccountId;
import static org.mariotaku.twidere.util.Utils.getTabDisplayOptionInt;
import static org.mariotaku.twidere.util.Utils.isDatabaseReady;
import static org.mariotaku.twidere.util.Utils.openMessageConversation;
import static org.mariotaku.twidere.util.Utils.openSearch;
@ -341,11 +339,6 @@ public class HomeActivity extends BaseAppCompatActivity implements OnClickListen
window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
}
super.onCreate(savedInstanceState);
if (!isDatabaseReady(this)) {
Toast.makeText(this, R.string.preparing_database_toast, Toast.LENGTH_SHORT).show();
finish();
return;
}
mMultiSelectHandler = new MultiSelectEventHandler(this);
mMultiSelectHandler.dispatchOnCreate();
if (!DataStoreUtils.hasAccount(this)) {

View File

@ -27,22 +27,22 @@ import org.mariotaku.twidere.R;
public class MediaUploaderPreference extends ServicePickerPreference implements Constants {
public MediaUploaderPreference(final Context context) {
super(context);
}
public MediaUploaderPreference(final Context context) {
super(context);
}
public MediaUploaderPreference(final Context context, final AttributeSet attrs) {
super(context, attrs);
}
public MediaUploaderPreference(final Context context, final AttributeSet attrs) {
super(context, attrs);
}
@Override
protected String getIntentAction() {
return INTENT_ACTION_EXTENSION_UPLOAD_MEDIA;
}
@Override
protected String getIntentAction() {
return INTENT_ACTION_EXTENSION_UPLOAD_MEDIA;
}
@Override
protected String getNoneEntry() {
return getContext().getString(R.string.image_uploader_default);
}
@Override
protected String getNoneEntry() {
return getContext().getString(R.string.media_uploader_default);
}
}

View File

@ -504,7 +504,9 @@ public class BackgroundOperationService extends IntentService implements Constan
StatusShortenerInterface shortener = null;
if (!ServicePickerPreference.isNoneValue(uploaderComponent)) {
uploader = MediaUploaderInterface.getInstance(app, uploaderComponent);
if (uploader == null) throw new UploaderNotFoundException(this);
if (uploader == null) {
throw new UploaderNotFoundException(getString(R.string.error_message_media_uploader_not_found));
}
}
if (!ServicePickerPreference.isNoneValue(shortenerComponent)) {
shortener = StatusShortenerInterface.getInstance(app, shortenerComponent);
@ -553,10 +555,12 @@ public class BackgroundOperationService extends IntentService implements Constan
uploadResult = uploader.upload(statusUpdate,
UploaderMediaItem.getFromStatusUpdate(this, statusUpdate));
} catch (final Exception e) {
throw new UploadException(this);
throw new UploadException(getString(R.string.error_message_media_upload_failed));
}
// Shouldn't return null, but handle that case for shitty extensions.
if (uploadResult == null) throw new UploadException(this);
if (uploadResult == null) {
throw new UploadException(getString(R.string.error_message_media_upload_failed));
}
if (uploadResult.error_code != 0)
throw new UploadException(uploadResult.error_message);
@ -825,7 +829,6 @@ public class BackgroundOperationService extends IntentService implements Constan
}
static class StatusTooLongException extends UpdateStatusException {
private static final long serialVersionUID = -6469920130856384219L;
public StatusTooLongException(final Context context) {
super(context.getString(R.string.error_message_status_too_long));
@ -851,21 +854,39 @@ public class BackgroundOperationService extends IntentService implements Constan
}
static class UploaderNotFoundException extends UpdateStatusException {
private static final long serialVersionUID = 1041685850011544106L;
public UploaderNotFoundException(final Context context) {
super(context.getString(R.string.error_message_image_uploader_not_found));
public UploaderNotFoundException() {
super();
}
public UploaderNotFoundException(String detailMessage, Throwable throwable) {
super(detailMessage, throwable);
}
public UploaderNotFoundException(Throwable throwable) {
super(throwable);
}
public UploaderNotFoundException(String message) {
super(message);
}
}
static class UploadException extends UpdateStatusException {
private static final long serialVersionUID = 8596614696393917525L;
public UploadException(final Context context) {
super(context.getString(R.string.error_message_image_upload_failed));
public UploadException() {
super();
}
public UploadException(final String message) {
public UploadException(String detailMessage, Throwable throwable) {
super(detailMessage, throwable);
}
public UploadException(Throwable throwable) {
super(throwable);
}
public UploadException(String message) {
super(message);
}
}

View File

@ -1208,10 +1208,7 @@ public final class Utils implements Constants {
@Nullable final CharSequence[] links,
@Nullable final CharSequence text) {
if (ArrayUtils.isEmpty(links) || text == null) return ParseUtils.parseString(text);
final SharedPreferences prefs = context.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE);
final String imageUploadFormat = getNonEmptyString(prefs, KEY_IMAGE_UPLOAD_FORMAT, DEFAULT_IMAGE_UPLOAD_FORMAT);
return imageUploadFormat.replace(FORMAT_PATTERN_LINK, TwidereArrayUtils.toString(links, ' ', false)).replace(
FORMAT_PATTERN_TEXT, text);
return text + " " + TwidereArrayUtils.toString(links, ' ', false);
}
public static File getInternalCacheDir(final Context context, final String cacheDirName) {
@ -1487,11 +1484,6 @@ public final class Utils implements Constants {
return url;
}
public static String getUnescapedStatusString(final String string) {
if (string == null) return null;
return string.replace("&amp;", "&").replace("&lt;", "<").replace("&gt;", ">");
}
@DrawableRes
public static int getUserTypeIconRes(final boolean isVerified, final boolean isProtected) {
if (isVerified)

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources xmlns:tools="http://schemas.android.com/tools" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"/>

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources xmlns:tools="http://schemas.android.com/tools" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"/>

0
twidere/src/main/res-localized/values-ar/strings.xml Executable file → Normal file
View File

View File

View File

0
twidere/src/main/res-localized/values-ast/plurals.xml Executable file → Normal file
View File

0
twidere/src/main/res-localized/values-ast/strings.xml Executable file → Normal file
View File

View File

View File

0
twidere/src/main/res-localized/values-ca/strings.xml Executable file → Normal file
View File

View File

View File

0
twidere/src/main/res-localized/values-cs/strings.xml Executable file → Normal file
View File

0
twidere/src/main/res-localized/values-da/strings.xml Executable file → Normal file
View File

View File

0
twidere/src/main/res-localized/values-de/plurals.xml Executable file → Normal file
View File

0
twidere/src/main/res-localized/values-de/strings.xml Executable file → Normal file
View File

View File

View File

0
twidere/src/main/res-localized/values-el/strings.xml Executable file → Normal file
View File

View File

View File

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources xmlns:tools="http://schemas.android.com/tools" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"/>

0
twidere/src/main/res-localized/values-es/plurals.xml Executable file → Normal file
View File

0
twidere/src/main/res-localized/values-es/strings.xml Executable file → Normal file
View File

View File

View File

0
twidere/src/main/res-localized/values-fa/strings.xml Executable file → Normal file
View File

View File

View File

0
twidere/src/main/res-localized/values-fi/strings.xml Executable file → Normal file
View File

View File

View File

0
twidere/src/main/res-localized/values-fr/plurals.xml Executable file → Normal file
View File

0
twidere/src/main/res-localized/values-fr/strings.xml Executable file → Normal file
View File

View File

View File

0
twidere/src/main/res-localized/values-hi/strings.xml Executable file → Normal file
View File

0
twidere/src/main/res-localized/values-hr/strings.xml Executable file → Normal file
View File

View File

View File

0
twidere/src/main/res-localized/values-hu/plurals.xml Executable file → Normal file
View File

0
twidere/src/main/res-localized/values-hu/strings.xml Executable file → Normal file
View File

View File

View File

0
twidere/src/main/res-localized/values-in/strings.xml Executable file → Normal file
View File

View File

View File

0
twidere/src/main/res-localized/values-it/plurals.xml Executable file → Normal file
View File

0
twidere/src/main/res-localized/values-it/strings.xml Executable file → Normal file
View File

View File

View File

0
twidere/src/main/res-localized/values-iw/strings.xml Executable file → Normal file
View File

0
twidere/src/main/res-localized/values-ja/plurals.xml Executable file → Normal file
View File

0
twidere/src/main/res-localized/values-ja/strings.xml Executable file → Normal file
View File

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="error_http_407">需要代理认证</string>
<string name="error_http_407">このプロキシには認証が必要です</string>
</resources>

View File

0
twidere/src/main/res-localized/values-ko/strings.xml Executable file → Normal file
View File

View File

View File

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources xmlns:tools="http://schemas.android.com/tools" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"/>

View File

@ -1,49 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources xmlns:tools="http://schemas.android.com/tools" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="app_description">UR OWN TWITTR APP</string>
<string name="compose">KAMPOZ</string>
<string name="add_account">ADD AKOUNT</string>
<string name="settings">SETINGS</string>
<string name="send">发送</string>
<string name="add_location">添加地理位置</string>
<string name="add_image">添加图像</string>
<string name="take_photo">拍照</string>
<string name="remove_location">移除地理位置</string>
<string name="remove_image">移除图片</string>
<string name="remove_photo">移除照片</string>
<string name="status_hint">发生了什么?</string>
<string name="sign_up">注册</string>
<string name="sign_in">登录</string>
<string name="rest_base_url">REST Base URL</string>
<string name="oauth_base_url">OAuth Base URL</string>
<string name="signing_oauth_base_url">登录 OAuth Base URL</string>
<string name="signing_rest_base_url">登录 REST Base URL</string>
<string name="api_url_format">API URL 格式</string>
<string name="same_oauth_signing_url">使用相同的 URL 登录 OAuth</string>
<string name="auth_type">Auth 类型</string>
<string name="oauth">OAuth</string>
<string name="xauth">xAuth</string>
<string name="basic">Basic</string>
<string name="twip_o">Twip O Mode</string>
<string name="advanced">高级</string>
<string name="save">保存</string>
<string name="edit">编辑</string>
<string name="edit_api">编辑 API</string>
<string name="home">主页</string>
<string name="mentions">提及</string>
<string name="error_occurred">发生了一个错误,请再试一次。</string>
<string name="error_already_logged_in">您已经登录了。</string>
<string name="no_account_selected">没有选择账号。</string>
<string name="error_unknown_error">错误:未知错误,这可能是一个 BUG 。</string>
<string name="error_message">错误:<xliff:g id="message">%s</xliff:g></string>
<string name="error_message_with_action">错误在 <xliff:g id="action">%1$s</xliff:g><xliff:g id="message">%2$s</xliff:g></string>
<string name="error_message_rate_limit">请求 Twitter 频率超限,请重试 <xliff:g id="time">%s</xliff:g></string>
<string name="error_message_rate_limit_with_action">TWITTERS RATE LIMIT EXCEEDD WHILE <xliff:g id="action">%1$s</xliff:g>, PLZ RETRY <xliff:g id="time">%2$s</xliff:g></string>
<string name="name_and_count_retweeted"><xliff:g id="user_name">%1$s</xliff:g><xliff:g id="retweet_count">%2$d</xliff:g> 等已转推</string>
<string name="N_retweeted_quantity_one" tools:ignore="PluralsCandidate"><xliff:g id="retweet_count">%d</xliff:g> 转推</string>
<string name="N_retweeted_quantity_other" tools:ignore="PluralsCandidate"><xliff:g id="retweet_count">%d</xliff:g> 转推</string>
<string name="retweeted_by_name">已由 <xliff:g id="user_name">%s</xliff:g> 转推</string>
<string name="retweeted_by_name_with_count">已由 <xliff:g id="user_name">%1$s</xliff:g><xliff:g id="retweet_count">%2$d</xliff:g> 等转推</string>
<string name="retweeted_by_count"><xliff:g id="retweet_count">%d</xliff:g> 用户转推</string>
</resources>

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="error_twitter_32">无法认证您,您可能需要尝试重新登录。</string>
<string name="error_twitter_34">这条推文、用户或页面不存在。</string>
<string name="error_twitter_88">超出频率限制,请稍候重试。</string>
<string name="error_twitter_89">您的登录信息出现错误或已过期,请重新登录。</string>
<string name="error_twitter_64">您的账号已经被冻结,并且不被允许访问这个功能。</string>
<string name="error_twitter_130">Twitter 暂时过载了。</string>
<string name="error_twitter_131">Twitter 服务器暂时宕机了,请稍后重试。</string>
<string name="error_twitter_135">请检查您的系统时钟。</string>
<string name="error_twitter_161">您已将关注请求发送给该用户。</string>
<string name="error_twitter_162">已经已经被该用户屏蔽。</string>
<string name="error_twitter_172">您已经保存了此次搜索。</string>
<string name="error_twitter_179">您无法查看受保护的用户推文。</string>
<string name="error_twitter_187">这条推文您已经发送过了。</string>
<string name="error_twitter_193">上传的照片太大了。</string>
<string name="error_twitter_215">您可能需要尝试再次登录。</string>
</resources>

0
twidere/src/main/res-localized/values-ms/strings.xml Executable file → Normal file
View File

0
twidere/src/main/res-localized/values-nl/strings.xml Executable file → Normal file
View File

View File

View File

0
twidere/src/main/res-localized/values-no/strings.xml Executable file → Normal file
View File

View File

View File

0
twidere/src/main/res-localized/values-pl/strings.xml Executable file → Normal file
View File

View File

0
twidere/src/main/res-localized/values-pt/plurals.xml Executable file → Normal file
View File

0
twidere/src/main/res-localized/values-pt/strings.xml Executable file → Normal file
View File

View File

View File

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources xmlns:tools="http://schemas.android.com/tools" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"/>

0
twidere/src/main/res-localized/values-ru/strings.xml Executable file → Normal file
View File

View File

View File

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources xmlns:tools="http://schemas.android.com/tools" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"/>

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources xmlns:tools="http://schemas.android.com/tools" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"/>

0
twidere/src/main/res-localized/values-sv/strings.xml Executable file → Normal file
View File

View File

View File

0
twidere/src/main/res-localized/values-th/plurals.xml Executable file → Normal file
View File

0
twidere/src/main/res-localized/values-th/strings.xml Executable file → Normal file
View File

0
twidere/src/main/res-localized/values-tr/strings.xml Executable file → Normal file
View File

View File

View File

0
twidere/src/main/res-localized/values-uk/strings.xml Executable file → Normal file
View File

View File

View File

0
twidere/src/main/res-localized/values-vi/strings.xml Executable file → Normal file
View File

Some files were not shown because too many files have changed in this diff Show More