Fixed pointless bug of unlinked translations

This commit is contained in:
Oizaro 2020-08-10 18:55:16 +02:00
parent b8346c8bb8
commit 420ace1219
7 changed files with 79 additions and 19 deletions

View File

@ -69,22 +69,22 @@ public class GcmAdvancedFragment extends ResourceSettingsFragment {
if (state == 0) {
int heartbeat = prefs.getHeartbeatMsFor(preference.getKey(), true);
if (heartbeat == 0) {
preference.setSummary("ON / Automatic");
preference.setSummary(getString(R.string.service_status_enabled_short) + " / " + getString(R.string.gcm_status_pref_auto));
} else {
preference.setSummary("ON / Automatic: " + getHeartbeatString(heartbeat));
preference.setSummary(getString(R.string.service_status_enabled_short) + " / " + getString(R.string.gcm_status_pref_auto) + ": " + getHeartbeatString(heartbeat));
}
} else if (state == -1) {
preference.setSummary("OFF");
preference.setSummary(getString(R.string.service_status_disabled_short));
} else {
preference.setSummary("ON / Manual: " + getHeartbeatString(state * 60000));
preference.setSummary(getString(R.string.service_status_enabled_short) + " / " + getString(R.string.gcm_status_pref_manual) + ": " + getHeartbeatString(state * 60000));
}
}
}
private String getHeartbeatString(int heartbeatMs) {
if (heartbeatMs < 120000) {
return (heartbeatMs / 1000) + " seconds";
return (heartbeatMs / 1000) + " " + getString(R.string.gcm_status_pref_sec);
}
return (heartbeatMs / 60000) + " minutes";
return (heartbeatMs / 60000) + " " + getString(R.string.gcm_status_pref_min);
}
}

View File

@ -28,7 +28,7 @@
layout="@layout/preference_switch_bar"
app:callback="@{switchBarCallback}"
app:checked="@{checkinEnabled}"
app:description='@{"Register device"}'
app:description='@{@string/pref_switcher_title}'
app:enabled="@{true}" />
<androidx.fragment.app.FragmentContainerView

View File

@ -32,7 +32,7 @@
layout="@layout/preference_switch_bar"
app:callback="@{switchBarCallback}"
app:checked="@{gcmEnabled}"
app:description='@{"Receive push notifications"}'
app:description='@{@string/pref_gcm_switcher_title}'
app:enabled="@{checkinEnabled}" />
<androidx.fragment.app.FragmentContainerView

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2013-2017 microG Project Team
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources>
<string-array name="gcm_network_config_values" translatables="false">
<item>-1</item>
<item>0</item>
<item>1</item>
<item>2</item>
<item>5</item>
<item>10</item>
<item>15</item>
<item>20</item>
<item>30</item>
</string-array>
<string-array name="gcm_network_config_names" translatables="false">
<item>@string/service_status_disabled</item>
<item>@string/service_status_automatic</item>
<!-- These will be automatically generated from the OS, no need to translate them -->
<item>Intervallo ping: 60 secondi</item>
<item>Intervallo ping: 2 minuti</item>
<item>Intervallo ping: 5 minuti</item>
<item>Intervallo ping: 10 minuti</item>
<item>Intervallo ping: 15 minuti</item>
<item>Intervallo ping: 20 minuti</item>
<item>Intervallo ping: 30 minuti</item>
</string-array>
</resources>

View File

@ -53,10 +53,10 @@ Questa operazione può richiedere alcuni minuti."</string>
<string name="service_name_checkin">Registrazione del dispositivo</string>
<string name="service_name_mcs">Messaggistica cloud</string>
<string name="service_status_disabled">Disabilitato</string>
<string name="service_status_disabled">Disattivato</string>
<string name="service_status_automatic">Automatico</string>
<string name="service_status_enabled_short">Abilitato</string>
<string name="service_status_disabled_short">Disabilitato</string>
<string name="service_status_enabled_short">Attivo</string>
<string name="service_status_disabled_short">Disattivato</string>
<string name="menu_advanced">Impostazioni avanzate</string>
<string name="list_no_item_none">Nessuna</string>
@ -69,8 +69,11 @@ Questa operazione può richiedere alcuni minuti."</string>
<!-- Settings strings -->
<string name="cond_gcm_bat_title">Ottimizzazioni della batteria abilitate</string>
<string name="cond_gcm_bat_summary">Hai abilitato il servizio di messaggistica cloud di Google, tuttavia le ottimizzazioni della batteria sono abilitate per microG. Al fine di garantire la ricezione delle notisfiche push, dovresti selezionare l\'opzione per ignorare le ottimizzazioni della batteria.</string>
<string name="prefcat_about">A proposito di microG</string>
<string name="prefcat_google_services">Servizi Google</string>
<string name="cond_gcm_bat_title">Ottimizzazioni della batteria attive</string>
<string name="cond_gcm_bat_summary">Hai attivato il servizio di messaggistica cloud di Google, tuttavia le ottimizzazioni della batteria sono attive per microG. Al fine di garantire la ricezione delle notisfiche push, dovresti selezionare l\'opzione per ignorare le ottimizzazioni della batteria.</string>
<string name="cond_gcm_bat_action">Ignora ottimizzazioni</string>
<string name="prefs_account">Preferenze dell\'account</string>
@ -78,10 +81,11 @@ Questa operazione può richiedere alcuni minuti."</string>
<string name="prefs_account_security">Accesso e sicurezza</string>
<string name="pref_auth_trust_google_title">Dai fiducia a Google per i permessi alle applicazioni</string>
<string name="pref_auth_trust_google_summary">Quando questa opzione è disabilitata, viene interpellato l\'utente prima che ogni richiesta di autorizzazione da parte delle applicazioni venga inviata a Google. Alcune applicazioni potrebbero fallire nell\'utilizzare l\'account Google se questa opzione è disabilitata.</string>
<string name="pref_auth_trust_google_summary">Quando questa opzione è disattivata, viene interpellato l\'utente prima che ogni richiesta di autorizzazione da parte delle applicazioni venga inviata a Google. Alcune applicazioni potrebbero fallire nell\'utilizzare l\'account Google se questa opzione è disattivata.</string>
<string name="pref_auth_visible_title">Autorizza le applicazioni a visualizzare gli account</string>
<string name="pref_auth_visible_summary">Quando questa opzione è abilitata, tutte le applicazioni su questo dispositivo saranno in grado di visualizzare gli indirizzi di posta elettronica dell\'account Google senza autorizzazione preventiva.</string>
<string name="pref_auth_visible_summary">Quando questa opzione è attiva, tutte le applicazioni su questo dispositivo saranno in grado di visualizzare gli indirizzi di posta elettronica dell\'account Google senza autorizzazione preventiva.</string>
<string name="pref_switcher_title">Registra dispositivo</string>
<string name="pref_checkin_enable_summary">Registra il tuo dispositivo ai servizi Google e crea un identificativo univoco. Vengono rimossi da microG alcuni bit funzionali all\'identificazione dai dati di registrazione, oltre al nome dell\'account Google.</string>
<string name="checkin_not_registered">Non registrato</string>
@ -92,12 +96,17 @@ Questa operazione può richiedere alcuni minuti."</string>
<string name="pref_add_account_title">Account</string>
<string name="pref_add_account_summary">Aggiungi un account Google</string>
<string name="pref_gcm_enable_mcs_summary">Il servizio di messaggistica cloud di Google è un fornitore di notifiche push utilizzato da molte applicazioni di terze parti. Per poterlo utlizzare devi abilitare la registrazione del dispositivo.</string>
<string name="pref_gcm_switcher_title">Ricevi notifiche push</string>
<string name="pref_gcm_enable_mcs_summary">Il servizio di messaggistica cloud di Google è un fornitore di notifiche push utilizzato da molte applicazioni di terze parti. Per poterlo utlizzare devi attivare la registrazione del dispositivo.</string>
<string name="pref_gcm_confirm_new_apps_title">Conferma le nuove applicazioni</string>
<string name="pref_gcm_confirm_new_apps_summary">Chiedi conferma all\'utente prima di registrare una nuova applicazione per le notifiche push.</string>
<string name="pref_about_title">A proposito di microG</string>
<string name="gcm_status_pref_auto">Automatico</string>
<string name="gcm_status_pref_manual">Manuale</string>
<string name="gcm_status_pref_sec">secondi</string>
<string name="gcm_status_pref_min">minuti</string>
<string name="gcm_unregister_app">Annulla la registrazione</string>
<string name="gcm_no_message_yet">Nessun messaggio ricevuto fino ad ora</string>
<string name="gcm_last_message_at">Ultimo messaggio: <xliff:g example="Yesterday, 02:20 PM">%1$s</xliff:g></string>
@ -114,6 +123,7 @@ Questa operazione può richiedere alcuni minuti."</string>
<string name="pref_push_app_allow_register_summary">Permetti all\'applicazione di registrarsi per la ricezione delle notifiche push.</string>
<string name="pref_push_app_wake_for_delivery_title">Avvia alla ricezione</string>
<string name="pref_push_app_wake_for_delivery_summary">Avvia l\'applicazione in background in seguito alla ricezione delle notifiche push.</string>
<string name="prefcat_status_title">Stato</string>
<string name="prefcat_push_apps_title">Applicazioni che utilizzano le notifiche push</string>
<string name="prefcat_push_apps_registered_title">Applicazioni registrate</string>
<string name="prefcat_push_apps_unregistered_title">Applicazioni non registrate</string>

View File

@ -68,8 +68,6 @@ This can take a couple of minutes."</string>
<string name="network_type_roaming">Roaming</string>
<string name="network_type_other">Other networks</string>
<!-- Self check -->
<!-- Settings strings -->
<string name="prefcat_about">About</string>
@ -94,15 +92,21 @@ This can take a couple of minutes."</string>
<string name="pref_add_account_title">Account</string>
<string name="pref_add_account_summary">Add Google account</string>
<string name="pref_gcm_switcher_title">Receive push notifications</string>
<string name="pref_gcm_enable_mcs_summary">Google Cloud Messaging is a push notification provider used by many third-party applications. To use it you must enable device registration.</string>
<string name="pref_gcm_confirm_new_apps_title">Confirm new apps</string>
<string name="pref_gcm_confirm_new_apps_summary">Ask before registering a new app to receive push notifications</string>
<string name="pref_about_title">About Vanced microG</string>
<string name="pref_switcher_title">Register device</string>
<string name="pref_checkin_enable_summary">Registers your device to Google services and creates a unique device identifier. Vanced microG strips identifying bits other than your Google account name from registration data.</string>
<string name="pref_info_status">Status</string>
<string name="gcm_status_pref_auto">Automatic</string>
<string name="gcm_status_pref_manual">Manual</string>
<string name="gcm_status_pref_sec">seconds</string>
<string name="gcm_status_pref_min">minutes</string>
<string name="gcm_unregister_app">Unregister</string>
<string name="gcm_no_message_yet">No messages received so far</string>
<string name="gcm_last_message_at">Last message: <xliff:g example="Yesterday, 02:20 PM">%1$s</xliff:g></string>
@ -119,6 +123,7 @@ This can take a couple of minutes."</string>
<string name="pref_push_app_allow_register_summary">Allow the app to register for push notifications.</string>
<string name="pref_push_app_wake_for_delivery_title">Start app on push message</string>
<string name="pref_push_app_wake_for_delivery_summary">Start the app while in background to receive the incoming push messages.</string>
<string name="prefcat_status_title">Status</string>
<string name="prefcat_push_apps_title">Apps using push notifications</string>
<string name="prefcat_push_apps_registered_title">Registered apps</string>
<string name="prefcat_push_apps_unregistered_title">Unregistered apps</string>

View File

@ -28,7 +28,7 @@
<Preference
android:key="pref_push_status"
android:selectable="false"
android:title="Status"
android:title="@string/prefcat_status_title"
tools:summary="Connected since 15 minutes ago" />
</PreferenceCategory>
<PreferenceCategory android:layout="@layout/preference_category_no_label">