diff --git a/app/src/main/assets/languages/iso_639_1.json b/app/src/main/assets/languages/iso_639_1.json index 00199b74..30bf870f 100644 --- a/app/src/main/assets/languages/iso_639_1.json +++ b/app/src/main/assets/languages/iso_639_1.json @@ -381,7 +381,7 @@ }, { "code": "lo", - "language": "ພາສາ" + "language": "ລາວ" }, { "code": "lt", @@ -726,5 +726,109 @@ { "code": "zu", "language": "isiZulu" + }, + { + "code": "ast", + "language": "Asturianu" + }, + { + "code": "ckb", + "language": "سۆرانی" + }, + { + "code": "cnr", + "language": "crnogorski" + }, + { + "code": "jbo", + "language": "la .lojban." + }, + { + "code": "kab", + "language": "Taqbaylit" + }, + { + "code": "kmr", + "language": "Kurmancî" + }, + { + "code": "ldn", + "language": "Láadan" + }, + { + "code": "lfn", + "language": "lingua franca nova" + }, + { + "code": "sco", + "language": "Scots" + }, + { + "code": "sma", + "language": "Åarjelsaemien Gïele" + }, + { + "code": "smj", + "language": "Julevsámegiella" + }, + { + "code": "szl", + "language": "ślůnsko godka" + }, + { + "code": "tai", + "language": "ภาษาไท or ภาษาไต" + }, + { + "code": "tok", + "language": "toki pona" + }, + { + "code": "zba", + "language": "باليبلن" + }, + { + "code": "zgh", + "language": "ⵜⴰⵎⴰⵣⵉⵖⵜ" + }, + { + "code": "en-GB", + "language": "English (British)" + }, + { + "code": "es-AR", + "language": "Español (Argentina)" + }, + { + "code": "es-MX", + "language": "Español (México)" + }, + { + "code": "fr-QC", + "language": "Français (Canadien)" + }, + { + "code": "pt-BR", + "language": "Português (Brasil)" + }, + { + "code": "pt-PT", + "language": "Português (Portugal)" + }, + { + "code": "sr-Latn", + "language": "Srpski (latinica)" + }, + { + "code": "zh-CN", + "language": "简体中文" + }, + { + "code": "zh-HK", + "language": "繁體中文(香港)" + }, + { + "code": "zh-TW", + "language": "繁體中文(臺灣)" } ] \ No newline at end of file diff --git a/app/src/main/java/app/fedilab/android/mastodon/helper/CustomEmoji.java b/app/src/main/java/app/fedilab/android/mastodon/helper/CustomEmoji.java index b1bd8244..9e99a567 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/helper/CustomEmoji.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/CustomEmoji.java @@ -30,7 +30,7 @@ import app.fedilab.android.mastodon.client.entities.api.Status; public class CustomEmoji extends ReplacementSpan { - private final float scale; + private float scale; private final WeakReference viewWeakReference; private Drawable imageDrawable; private boolean callbackCalled; @@ -40,6 +40,9 @@ public class CustomEmoji extends ReplacementSpan { this.viewWeakReference = viewWeakReference; SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(mContext); scale = sharedpreferences.getFloat(mContext.getString(R.string.SET_FONT_SCALE), 1.1f); + if (scale > 1.3f) { + scale = 1.3f; + } callbackCalled = false; } diff --git a/app/src/main/java/app/fedilab/android/mastodon/jobs/ComposeWorker.java b/app/src/main/java/app/fedilab/android/mastodon/jobs/ComposeWorker.java index 3c0ab65b..6e663374 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/jobs/ComposeWorker.java +++ b/app/src/main/java/app/fedilab/android/mastodon/jobs/ComposeWorker.java @@ -230,7 +230,6 @@ public class ComposeWorker extends Worker { LocalBroadcastManager.getInstance(context).sendBroadcast(intentBD); return; } - String language = sharedPreferences.getString(context.getString(R.string.SET_COMPOSE_LANGUAGE) + dataPost.userId + dataPost.instance, null); if (statuses.get(i).local_only) { statuses.get(i).text += " \uD83D\uDC41"; } @@ -258,11 +257,11 @@ public class ComposeWorker extends Worker { if (dataPost.scheduledDate == null) { if (dataPost.statusEditId == null) { statusCall = mastodonStatusesService.createStatus(null, dataPost.token, statuses.get(i).text, attachmentIds, poll_options, poll_expire_in, - poll_multiple, poll_hide_totals, statuses.get(i).quote_id == null ? in_reply_to_status : null, statuses.get(i).sensitive, statuses.get(i).spoilerChecked ? statuses.get(i).spoiler_text : null, statuses.get(i).visibility.toLowerCase(), language, statuses.get(i).quote_id, statuses.get(i).content_type); + poll_multiple, poll_hide_totals, statuses.get(i).quote_id == null ? in_reply_to_status : null, statuses.get(i).sensitive, statuses.get(i).spoilerChecked ? statuses.get(i).spoiler_text : null, statuses.get(i).visibility.toLowerCase(), statuses.get(i).language, statuses.get(i).quote_id, statuses.get(i).content_type); } else { //Status is edited statusCall = mastodonStatusesService.updateStatus(null, dataPost.token, dataPost.statusEditId, statuses.get(i).text, attachmentIds, poll_options, poll_expire_in, poll_multiple, poll_hide_totals, statuses.get(i).quote_id == null ? in_reply_to_status : null, statuses.get(i).sensitive, - statuses.get(i).spoilerChecked ? statuses.get(i).spoiler_text : null, statuses.get(i).visibility.toLowerCase(), language, + statuses.get(i).spoilerChecked ? statuses.get(i).spoiler_text : null, statuses.get(i).visibility.toLowerCase(), statuses.get(i).language, media_edit_id, media_edit_description, media_edit_focus); } try { diff --git a/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ComposeAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ComposeAdapter.java index 7b0bdf18..41e110ad 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ComposeAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ComposeAdapter.java @@ -1695,7 +1695,7 @@ public class ComposeAdapter extends RecyclerView.Adapter storedLanguages = sharedPreferences.getStringSet(getString(R.string.SET_SELECTED_LANGUAGE), null); + + String[] selectedValue = new String[0]; + if (storedLanguages != null && storedLanguages.size() > 0) { + if (storedLanguages.size() == 1 && storedLanguages.toArray()[0] == null) { + sharedPreferences.edit().remove(getString(R.string.SET_SELECTED_LANGUAGE)).commit(); + } else { + selectedValue = storedLanguages.toArray(new String[0]); + } + } + List languages = Languages.get(requireActivity()); + if (languages != null) { + String[] codesArr = new String[languages.size()]; + String[] languagesArr = new String[languages.size()]; + int i = 0; + for (Languages.Language language : languages) { + codesArr[i] = language.code; + languagesArr[i] = language.language; + i++; + } + SET_SELECTED_LANGUAGE.setEntries(languagesArr); + SET_SELECTED_LANGUAGE.setEntryValues(codesArr); + if (selectedValue.length > 0) { + SET_SELECTED_LANGUAGE.setDefaultValue(selectedValue); + } + } + + } + + } @Override diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 75382f5d..44ae065a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -900,374 +900,7 @@ szl sc - - aa - ab - ae - af - ak - am - an - ar - as - av - ay - az - ba - be - bg - bh - bi - bm - bn - bo - br - bs - ca - ce - ch - co - cr - cs - cu - cv - cy - da - de - dv - dz - ee - el - en - eo - es - et - eu - fa - ff - fi - fj - fo - fr - fy - ga - gd - gl - gu - gv - ha - he - hi - ho - hr - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - io - is - it - iu - ja - jv - ka - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ku - kv - kw - ky - la - lb - lg - li - ln - lo - lt - lu - lv - mg - mh - mi - mk - ml - mn - mr - ms - mt - my - na - nb - nd - ne - ng - nl - nn - no - nr - nv - ny - oc - oj - om - or - os - pa - pi - pl - ps - pt - qu - rm - rn - ro - ru - rw - sa - sc - sd - se - sg - si - sk - sl - sn - so - sq - sr - ss - st - su - sv - sw - ta - te - tg - th - ti - tk - tl - tn - to - tr - ts - tt - tw - ty - ug - uk - ur - uz - ve - vi - vo - wa - wo - xh - yi - yo - za - zh - zu - - - Afaraf - аҧсуа бызшәа - avesta - Afrikaans - Akan - አማርኛ - aragonés - اللغة العربية - অসমীয়া - авар мацӀ - aymar aru - azərbaycan dili - башҡорт теле - беларуская мова - български език - भोजपुरी - Bislama - bamanankan - বাংলা - བོད་ཡིག - brezhoneg - bosanski jezik - Català - нохчийн мотт - Chamoru - corsu - ᓀᐦᐃᔭᐍᐏᐣ - čeština - ѩзыкъ словѣньскъ - чӑваш чӗлхи - Cymraeg - dansk - Deutsch - Dhivehi - རྫོང་ཁ - Eʋegbe - Ελληνικά - English - Esperanto - Español - eesti - euskara - فارسی - Fulfulde - suomi - Vakaviti - føroyskt - Français - Frysk - Gaeilge - Gàidhlig - galego - ગુજરાતી - Gaelg - هَوُسَ - עברית - हिन्दी - Hiri Motu - Hrvatski - Kreyòl ayisyen - magyar - Հայերեն - Otjiherero - Interlingua - Bahasa Indonesia - Interlingue - Asụsụ Igbo - ꆈꌠ꒿ Nuosuhxop - Iñupiaq - Ido - Íslenska - Italiano - ᐃᓄᒃᑎᑐᑦ - 日本語 - basa Jawa - ქართული - Kikongo - Gĩkũyũ - Kuanyama - қазақ тілі - kalaallisut - ខេមរភាសា - ಕನ್ನಡ - 한국어 - Kanuri - कश्मीरी - Kurmancî - коми кыв - Kernewek - Кыргызча - latine - Lëtzebuergesch - Luganda - Limburgs - Lingála - ພາສາ - lietuvių kalba - Tshiluba - latviešu valoda - fiteny malagasy - Kajin M̧ajeļ - te reo Māori - македонски јазик - മലയാളം - Монгол хэл - मराठी - Bahasa Melayu - Malti - ဗမာစာ - Ekakairũ Naoero - Norsk bokmål - isiNdebele - नेपाली - Owambo - Nederlands - Norsk Nynorsk - Norsk - isiNdebele - Diné bizaad - chiCheŵa - occitan - ᐊᓂᔑᓈᐯᒧᐎᓐ - Afaan Oromoo - ଓଡ଼ିଆ - ирон æвзаг - ਪੰਜਾਬੀ - पाऴि - Polski - پښتو - Português - Runa Simi - rumantsch grischun - Ikirundi - Română - Русский - Ikinyarwanda - संस्कृतम् - sardu - सिन्धी - Davvisámegiella - yângâ tî sängö - සිංහල - slovenčina - slovenščina - chiShona - Soomaaliga - Shqip - српски језик - SiSwati - Sesotho - Basa Sunda - Svenska - Kiswahili - தமிழ் - తెలుగు - тоҷикӣ - ไทย - ትግርኛ - Türkmen - Wikang Tagalog - Setswana - faka Tonga - Türkçe - Xitsonga - татар теле - Twi - Reo Tahiti - ئۇيغۇرچە‎ - Українська - اردو - Ўзбек - Tshivenḓa - Tiếng Việt - Volapük - walon - Wollof - isiXhosa - ייִדיש - Yorùbá - Saɯ cueŋƅ - 中文 - isiZulu - + en fr diff --git a/app/src/main/res/xml/pref_compose.xml b/app/src/main/res/xml/pref_compose.xml index 52fc8276..3eb2363d 100644 --- a/app/src/main/res/xml/pref_compose.xml +++ b/app/src/main/res/xml/pref_compose.xml @@ -47,8 +47,6 @@ app:title="@string/set_unlisted_replies" />