Browse Source

Fix unused translations lint warnings (#5036)

Fixes #5032

I added all languages that where marked as unused to the locale file.

The only language that maybe is not really worth putting in there is
berber with 36 translations right now.
But in the end those 36 may be better (if they are correct).
pull/5048/head
Janusz Leidgens 1 year ago committed by GitHub
parent
commit
e65de1bea9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 141
      app/lint-baseline.xml
  2. 22
      app/src/main/res/values/donottranslate.xml
  3. 10
      app/src/main/res/xml/locales_config.xml

141
app/lint-baseline.xml

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 8.8.2" type="baseline" client="gradle" dependencies="false" name="AGP (8.8.2)" variant="all" version="8.8.2">
<issues format="6" by="lint 8.9.1" type="baseline" client="gradle" dependencies="false" name="AGP (8.9.1)" variant="all" version="8.9.1">
<issue
id="GestureBackNavigation"
@ -8,7 +8,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/keylesspalace/tusky/components/compose/ComposeActivity.kt"
line="1281"
line="1235"
column="28"/>
</issue>
@ -53,14 +53,14 @@
<issue
id="PrivateResource"
message="Overriding `@layout/exo_player_control_view` which is marked as private in androidx.media3:media3-ui:1.5.1. If deliberate, use tools:override=&quot;true&quot;, otherwise pick a different name.">
message="Overriding `@layout/exo_player_control_view` which is marked as private in androidx.media3:media3-ui:1.6.0. If deliberate, use tools:override=&quot;true&quot;, otherwise pick a different name.">
<location
file="src/main/res/layout/exo_player_control_view.xml"/>
</issue>
<issue
id="PrivateResource"
message="The resource `@color/exo_bottom_bar_background` is marked as private in androidx.media3:media3-ui:1.5.1"
message="The resource `@color/exo_bottom_bar_background` is marked as private in androidx.media3:media3-ui:1.6.0"
errorLine1=" android:background=&quot;@color/exo_bottom_bar_background&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@ -71,7 +71,7 @@
<issue
id="PrivateResource"
message="The resource `@dimen/exo_styled_controls_padding` is marked as private in androidx.media3:media3-ui:1.5.1"
message="The resource `@dimen/exo_styled_controls_padding` is marked as private in androidx.media3:media3-ui:1.6.0"
errorLine1=" android:padding=&quot;@dimen/exo_styled_controls_padding&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@ -82,7 +82,7 @@
<issue
id="PrivateResource"
message="The resource `@layout/exo_player_control_rewind_button` is marked as private in androidx.media3:media3-ui:1.5.1"
message="The resource `@layout/exo_player_control_rewind_button` is marked as private in androidx.media3:media3-ui:1.6.0"
errorLine1=" &lt;include layout=&quot;@layout/exo_player_control_rewind_button&quot; />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@ -93,7 +93,7 @@
<issue
id="PrivateResource"
message="The resource `@layout/exo_player_control_ffwd_button` is marked as private in androidx.media3:media3-ui:1.5.1"
message="The resource `@layout/exo_player_control_ffwd_button` is marked as private in androidx.media3:media3-ui:1.6.0"
errorLine1=" &lt;include layout=&quot;@layout/exo_player_control_ffwd_button&quot; />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@ -104,7 +104,7 @@
<issue
id="PrivateResource"
message="The resource `@dimen/exo_styled_bottom_bar_height` is marked as private in androidx.media3:media3-ui:1.5.1"
message="The resource `@dimen/exo_styled_bottom_bar_height` is marked as private in androidx.media3:media3-ui:1.6.0"
errorLine1=" android:layout_height=&quot;@dimen/exo_styled_bottom_bar_height&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@ -115,7 +115,7 @@
<issue
id="PrivateResource"
message="The resource `@dimen/exo_styled_bottom_bar_margin_top` is marked as private in androidx.media3:media3-ui:1.5.1"
message="The resource `@dimen/exo_styled_bottom_bar_margin_top` is marked as private in androidx.media3:media3-ui:1.6.0"
errorLine1=" android:layout_marginTop=&quot;@dimen/exo_styled_bottom_bar_margin_top&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@ -126,7 +126,7 @@
<issue
id="PrivateResource"
message="The resource `@color/exo_bottom_bar_background` is marked as private in androidx.media3:media3-ui:1.5.1"
message="The resource `@color/exo_bottom_bar_background` is marked as private in androidx.media3:media3-ui:1.6.0"
errorLine1=" android:background=&quot;@color/exo_bottom_bar_background&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@ -137,7 +137,7 @@
<issue
id="PrivateResource"
message="The resource `@dimen/exo_styled_bottom_bar_time_padding` is marked as private in androidx.media3:media3-ui:1.5.1"
message="The resource `@dimen/exo_styled_bottom_bar_time_padding` is marked as private in androidx.media3:media3-ui:1.6.0"
errorLine1=" android:paddingStart=&quot;@dimen/exo_styled_bottom_bar_time_padding&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@ -148,7 +148,7 @@
<issue
id="PrivateResource"
message="The resource `@dimen/exo_styled_bottom_bar_time_padding` is marked as private in androidx.media3:media3-ui:1.5.1"
message="The resource `@dimen/exo_styled_bottom_bar_time_padding` is marked as private in androidx.media3:media3-ui:1.6.0"
errorLine1=" android:paddingEnd=&quot;@dimen/exo_styled_bottom_bar_time_padding&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@ -159,7 +159,7 @@
<issue
id="PrivateResource"
message="The resource `@dimen/exo_styled_bottom_bar_time_padding` is marked as private in androidx.media3:media3-ui:1.5.1"
message="The resource `@dimen/exo_styled_bottom_bar_time_padding` is marked as private in androidx.media3:media3-ui:1.6.0"
errorLine1=" android:paddingLeft=&quot;@dimen/exo_styled_bottom_bar_time_padding&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@ -170,7 +170,7 @@
<issue
id="PrivateResource"
message="The resource `@dimen/exo_styled_bottom_bar_time_padding` is marked as private in androidx.media3:media3-ui:1.5.1"
message="The resource `@dimen/exo_styled_bottom_bar_time_padding` is marked as private in androidx.media3:media3-ui:1.6.0"
errorLine1=" android:paddingRight=&quot;@dimen/exo_styled_bottom_bar_time_padding&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@ -181,7 +181,7 @@
<issue
id="PrivateResource"
message="The resource `@dimen/exo_styled_progress_layout_height` is marked as private in androidx.media3:media3-ui:1.5.1"
message="The resource `@dimen/exo_styled_progress_layout_height` is marked as private in androidx.media3:media3-ui:1.6.0"
errorLine1=" android:layout_height=&quot;@dimen/exo_styled_progress_layout_height&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@ -192,7 +192,7 @@
<issue
id="PrivateResource"
message="The resource `@dimen/exo_styled_progress_margin_bottom` is marked as private in androidx.media3:media3-ui:1.5.1"
message="The resource `@dimen/exo_styled_progress_margin_bottom` is marked as private in androidx.media3:media3-ui:1.6.0"
errorLine1=" android:layout_marginBottom=&quot;@dimen/exo_styled_progress_margin_bottom&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@ -203,7 +203,7 @@
<issue
id="PrivateResource"
message="The resource `@dimen/exo_styled_minimal_controls_margin_bottom` is marked as private in androidx.media3:media3-ui:1.5.1"
message="The resource `@dimen/exo_styled_minimal_controls_margin_bottom` is marked as private in androidx.media3:media3-ui:1.6.0"
errorLine1=" android:layout_marginBottom=&quot;@dimen/exo_styled_minimal_controls_margin_bottom&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@ -263,109 +263,10 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
line="795"
line="796"
column="5"/>
</issue>
<issue
id="UnusedTranslation"
message="The language `ber (Berber languages)` is present in this project, but not declared in the `localeConfig` resource"
errorLine1=" android:localeConfig=&quot;@xml/locales_config&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/AndroidManifest.xml"
line="21"
column="31"/>
</issue>
<issue
id="UnusedTranslation"
message="The language `el (Greek)` is present in this project, but not declared in the `localeConfig` resource"
errorLine1=" android:localeConfig=&quot;@xml/locales_config&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/AndroidManifest.xml"
line="21"
column="31"/>
</issue>
<issue
id="UnusedTranslation"
message="The language `fi (Finnish)` is present in this project, but not declared in the `localeConfig` resource"
errorLine1=" android:localeConfig=&quot;@xml/locales_config&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/AndroidManifest.xml"
line="21"
column="31"/>
</issue>
<issue
id="UnusedTranslation"
message="The language `fy (Western Frisian)` is present in this project, but not declared in the `localeConfig` resource"
errorLine1=" android:localeConfig=&quot;@xml/locales_config&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/AndroidManifest.xml"
line="21"
column="31"/>
</issue>
<issue
id="UnusedTranslation"
message="The language `in (Indonesian)` is present in this project, but not declared in the `localeConfig` resource"
errorLine1=" android:localeConfig=&quot;@xml/locales_config&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/AndroidManifest.xml"
line="21"
column="31"/>
</issue>
<issue
id="UnusedTranslation"
message="The language `lv (Latvian)` is present in this project, but not declared in the `localeConfig` resource"
errorLine1=" android:localeConfig=&quot;@xml/locales_config&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/AndroidManifest.xml"
line="21"
column="31"/>
</issue>
<issue
id="UnusedTranslation"
message="The language `ml (Malayalam)` is present in this project, but not declared in the `localeConfig` resource"
errorLine1=" android:localeConfig=&quot;@xml/locales_config&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/AndroidManifest.xml"
line="21"
column="31"/>
</issue>
<issue
id="UnusedTranslation"
message="The language `si (Sinhala)` is present in this project, but not declared in the `localeConfig` resource"
errorLine1=" android:localeConfig=&quot;@xml/locales_config&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/AndroidManifest.xml"
line="21"
column="31"/>
</issue>
<issue
id="UnusedTranslation"
message="The language `sk (Slovak)` is present in this project, but not declared in the `localeConfig` resource"
errorLine1=" android:localeConfig=&quot;@xml/locales_config&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/AndroidManifest.xml"
line="21"
column="31"/>
</issue>
<issue
id="DataExtractionRules"
message="The attribute `android:allowBackup` is deprecated from Android 12 and higher and may be removed in future versions. Consider adding the attribute `android:dataExtractionRules` specifying an `@xml` resource which configures cloud backups and device transfers on Android 12 and higher."
@ -384,7 +285,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/keylesspalace/tusky/components/account/AccountActivity.kt"
line="484"
line="485"
column="9"/>
</issue>
@ -501,7 +402,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/layout/item_conversation.xml"
line="252"
line="271"
column="9"/>
</issue>
@ -677,7 +578,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java"
line="1188"
line="1197"
column="42"/>
</issue>

22
app/src/main/res/values/donottranslate.xml

@ -39,6 +39,7 @@
<string-array name="language_entries">
<item>@string/system_default</item>
<item>Bahasa Indonesia</item>
<item>Català</item>
<item>Čeština</item>
<item>Cymraeg</item>
@ -49,11 +50,14 @@
<item>Español</item>
<item>Euskara</item>
<item>Français</item>
<item>Frysk</item>
<item>Gaeilge</item>
<item>Gàidhlig</item>
<item>Galego</item>
<item>íslenska</item>
<item>Italiano</item>
<item>latviešu valoda</item>
<item>Lëtzebuergesch</item>
<item>Magyar</item>
<item>Nederlands</item>
<item>Norsk</item>
@ -61,7 +65,9 @@
<item>Polski</item>
<item>Português (Brasil)</item>
<item>Português (Portugal)</item>
<item>Slovenščina</item>
<item>slovenski jezik</item>
<item>slovenský jazyk</item>
<item>Suomi</item>
<item>Svenska</item>
<item>Taqbaylit</item>
<item>Tiếng Việt</item>
@ -87,10 +93,15 @@
<item>中文(简体)</item>
<item>中文(香港)</item>
<item>日本語</item>
<item>ⵜⴰⵎⴰⵣⵉⵖⵜ</item>
<item>Ελληνικά</item>
<item>മലയ</item>
<item>හල</item>
</string-array>
<string-array name="language_values">
<item>default</item>
<item>in</item>
<item>ca</item>
<item>cs</item>
<item>cy</item>
@ -101,11 +112,14 @@
<item>es</item>
<item>eu</item>
<item>fr</item>
<item>fy</item>
<item>ga</item>
<item>gd</item>
<item>gl</item>
<item>is</item>
<item>it</item>
<item>lv</item>
<item>lb</item>
<item>hu</item>
<item>nl</item>
<item>nb-NO</item>
@ -114,6 +128,8 @@
<item>pt-BR</item>
<item>pt-PT</item>
<item>sl</item>
<item>sk</item>
<item>fi</item>
<item>sv</item>
<item>kab</item>
<item>vi</item>
@ -139,6 +155,10 @@
<item>zh-CN</item>
<item>zh-HK</item>
<item>ja</item>
<item>ber</item>
<item>el</item>
<item>ml</item>
<item>si</item>
</string-array>
<string-array name="pref_main_nav_position_options">

10
app/src/main/res/xml/locales_config.xml

@ -49,4 +49,14 @@
<locale android:name="zh-CN"/>
<locale android:name="zh-HK"/>
<locale android:name="ja"/>
<locale android:name="ber"/>
<locale android:name="el"/>
<locale android:name="fi"/>
<locale android:name="fy"/>
<locale android:name="in"/>
<locale android:name="lb"/>
<locale android:name="lv"/>
<locale android:name="ml"/>
<locale android:name="si"/>
<locale android:name="sk"/>
</locale-config>

Loading…
Cancel
Save