The Wayback Machine - https://web.archive.org/web/20211123081243/https://github.com/microg/GmsCore/commit/cc338e307867374050cd01be5a910d0ea0377fde
Skip to content
Permalink
Browse files
Move plurals into seperate files, make Condition use plurals
  • Loading branch information
mar-v-in committed Feb 26, 2017
1 parent 949400f commit cc338e307867374050cd01be5a910d0ea0377fde
@@ -8,6 +8,12 @@ source_file = play-services-core/src/main/res/values/strings.xml
source_lang = en
type = ANDROID

[gmscore.plurals]
file_filter = play-services-core/src/main/res/values-<lang>/plurals.xml
source_file = play-services-core/src/main/res/values/plurals.xml
source_lang = en
type = ANDROID

[gmscore.permissions]
file_filter = play-services-core/src/main/res/values-<lang>/permissions.xml
source_file = play-services-core/src/main/res/values/permissions.xml
@@ -64,18 +64,25 @@ public void onClick(View v) {
private static final String[] REQUIRED_PERMISSIONS = new String[]{ACCESS_COARSE_LOCATION, WRITE_EXTERNAL_STORAGE, GET_ACCOUNTS, READ_PHONE_STATE};
public static final Condition PERMISSIONS = new Condition.Builder()
.title(R.string.cond_perm_title)
.summary(R.string.cond_perm_summary)
.summaryPlurals(R.plurals.cond_perm_summary)
.evaluation(new Condition.Evaluation() {
int count = 0;
@Override
public boolean isActive(Context context) {
count = 0;
for (String permission : REQUIRED_PERMISSIONS) {
if (ContextCompat.checkSelfPermission(context, permission) != PERMISSION_GRANTED)
return true;
count++;
}
return false;
return count > 0;
}

@Override
public int getPluralsCount() {
return count;
}
})
.firstAction(R.string.cond_perm_action, new View.OnClickListener() {
.firstActionPlurals(R.plurals.cond_perm_action, new View.OnClickListener() {
@Override
public void onClick(View v) {
if (v.getContext() instanceof Activity) {
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<plurals name="pref_unifiednlp_summary">
<item quantity="one"><xliff:g example="1">%1$d</xliff:g> backend eingestellt</item>
<item quantity="other"><xliff:g example="3">%1$d</xliff:g> backends eingestellt</item>
</plurals>
<plurals name="gcm_registered_apps_counter">
<item quantity="one"><xliff:g example="1">%1$d</xliff:g> registrierte App</item>
<item quantity="other"><xliff:g example="123">%1$d</xliff:g> registrierte Apps</item>
</plurals>
<plurals name="cond_perm_summary">
<item quantity="one">Eine Berechtigungen, die für die ordnungsgemäße Funktionalität von microG Services Core benötigt werden, ist nicht zugeteilt.</item>
<item quantity="other">Mehrere Berechtigungen, die für die ordnungsgemäße Funktionalität von microG Services Core benötigt werden, sind nicht zugeteilt.</item>
</plurals>
<plurals name="cond_perm_action">
<item quantity="one">Fehlende Berechtigung anfragen</item>
<item quantity="other">Fehlende Berechtigungen anfragen</item>
</plurals>
</resources>
@@ -73,8 +73,6 @@ Dies kann einige Minuten dauern."</string>
<string name="prefcat_test">Test</string>

<string name="cond_perm_title">Berechtigung fehlt</string>
<string name="cond_perm_summary">Eine oder mehrere Berechtigungen, die für die ordnungsgemäße Funktionalität von microG Services Core benötigt werden, sind nicht zugeteilt.</string>
<string name="cond_perm_action">Fehlende Berechtigungen anfragen</string>

<string name="prefs_account">Kontoeinstellungen</string>
<string name="prefs_account_privacy">Persönliche Daten &amp; Privatsphäre</string>
@@ -86,10 +84,6 @@ Dies kann einige Minuten dauern."</string>
<string name="pref_checkin_enable_summary">Registriert den Gerät zur Nutzung von Google-Diensten und erzeugt eine eindeutige Kennung. microG entfernt identifizierende Daten außer dem Namen des Google-Kontos.</string>

<string name="pref_more_settings">Mehr</string>
<plurals name="pref_unifiednlp_summary">
<item quantity="one"><xliff:g example="1">%1$d</xliff:g> backend eingestellt</item>
<item quantity="other"><xliff:g example="3">%1$d</xliff:g> backends eingestellt</item>
</plurals>

<string name="pref_gcm_enable_mcs_summary">Google Cloud Messaging ist ein Push-Nachrichten-Dienst, der von vielen Apps genutzt wird. Zur Benutzung muss Geräte Check-In aktiviert werden.</string>
<string name="pref_gcm_apps_title">Apps die Cloud Messaging benutzen</string>
@@ -98,10 +92,6 @@ Dies kann einige Minuten dauern."</string>
<string name="pref_about_title">Über microG Services Core</string>
<string name="pref_about_summary">Versionsinformation und genutzte Bibliotheken</string>

<plurals name="gcm_registered_apps_counter">
<item quantity="one"><xliff:g example="1">%1$d</xliff:g> registrierte App</item>
<item quantity="other"><xliff:g example="123">%1$d</xliff:g> registrierte Apps</item>
</plurals>
<string name="gcm_app_error_unregistering">Fehler bei der Abmeldung</string>
<string name="gcm_app_not_installed_anymore">Nicht mehr installiert</string>
<string name="gcm_unregister_app">Abmelden</string>
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
</resources>
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<plurals name="pref_unifiednlp_summary">
<item quantity="one"><xliff:g example="3">%1$d</xliff:g> fournisseur configuré</item>
<item quantity="other"><xliff:g example="3">%1$d</xliff:g> fournisseurs configurés</item>
</plurals>
<plurals name="gcm_registered_apps_counter">
<item quantity="one"><xliff:g example="1">%1$d</xliff:g> application enregistrée</item>
<item quantity="other"><xliff:g example="123">%1$d</xliff:g> applications enregistrées</item>
</plurals>
<plurals name="cond_perm_summary">
<item quantity="one">Une autorisation requises pour le fonctionnement correct de microG Service Core est manquante.</item>
<item quantity="other">Plusieurs autorisations requises pour le fonctionnement correct de microG Service Core sont manquantes.</item>
</plurals>
<plurals name="cond_perm_action">
<item quantity="one">Demander la autorisation manquante</item>
<item quantity="other">Demander les autorisations manquantes</item>
</plurals>
</resources>
@@ -21,8 +21,8 @@
<string name="just_a_sec">Juste une seconde…</string>
<string name="google_account_label">Google</string>
<string name="ask_permission_tos">En poursuivant, vous autorisez cette application et Google à utiliser vos informations en accord avec leurs termes de service et politiques de vie privée respectifs.</string>
<string name="ask_scope_permission_title"><xliff:g example="F-Droid">%1$s</xliff:g> voudrait:</string>
<string name="ask_service_permission_title"><xliff:g example="F-Droid">%1$s</xliff:g> voudrait utiliser:</string>
<string name="ask_scope_permission_title"><xliff:g example="F-Droid">%1$s</xliff:g> voudrait :</string>
<string name="ask_service_permission_title"><xliff:g example="F-Droid">%1$s</xliff:g> voudrait utiliser :</string>
<string name="account_manager_title">Gestionnaire du compte Google</string>
<string name="sorry">Désolé…</string>
<string name="no_network_error_desc">"Vous n’avez pas de connexion réseau.
@@ -113,8 +113,6 @@ Ceci peut prendre plusieurs minutes."</string>
<string name="cond_gcm_bat_summary">Vous avez activé Google Cloud Messaging mais l’optimisation de la batterie est activée pour microG Services Core. Afin de recevoir les notifications push vous devriez désactiver les optimisations de la batterie.</string>
<string name="cond_gcm_bat_action">Désactiver les optimisations de la batterie</string>
<string name="cond_perm_title">Autorisations manquantes</string>
<string name="cond_perm_summary">Une ou plusieurs autorisations requises pour le fonctionnement correct de microG Service Core sont manquantes.</string>
<string name="cond_perm_action">Demander les autorisations manquantes</string>

<string name="prefs_account">Préférences du compte</string>
<string name="prefs_account_privacy">Informations personnelles &amp; vie privée</string>
@@ -126,10 +124,6 @@ Ceci peut prendre plusieurs minutes."</string>
<string name="pref_checkin_enable_summary">Enregistre votre terminal auprès des services Google et crée un identifiant unique. microG retire les identifiants autres que le nom de votre compte Google des informations d’enregistrement.</string>

<string name="pref_more_settings">Plus</string>
<plurals name="pref_unifiednlp_summary">
<item quantity="one"><xliff:g example="3">%1$d</xliff:g> fournisseur configuré</item>
<item quantity="other"><xliff:g example="3">%1$d</xliff:g> fournisseurs configurés</item>
</plurals>

<string name="pref_gcm_enable_mcs_summary">Google Cloud Messaging est un fournisseur de notifications push utilisés par beaucoup d’applications tierces. Pour l’utiliser vous devez activez l’enregistrement du terminal.</string>
<string name="pref_gcm_heartbeat_title">Intervalle des signaux de présence Cloud Messaging</string>
@@ -143,9 +137,6 @@ Ceci peut prendre plusieurs minutes."</string>
<string name="pref_about_title">À propos de microG Services Core</string>
<string name="pref_about_summary">Informations de version et librairies utilisées</string>

<plurals name="gcm_registered_apps_counter">
<item quantity="other"><xliff:g example="123">%1$d</xliff:g> applications enregistrées</item>
</plurals>
<string name="gcm_app_error_unregistering">Erreur lors du désenregistrement</string>
<string name="gcm_app_not_installed_anymore">Cette application n’est plus installée</string>
<string name="gcm_unregister_app">Désenregistrer</string>
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright 2013-2015 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 name="permission_service_all_label">Wszystkie usługi Google</string>
<string name="permission_service_all_description">Zezwala aplikacji na dostęp do wszystkich usług Google przez dowolne powiązane konto Google.</string>

<string name="permission_service_android_label">Usługi Android</string>
<string name="permission_service_android_description">Zezwala aplikacji na dostęp do usług Androida przez dowolne powiązane konto Google.</string>
<string name="permission_service_adsense_label">AdSense</string>
<string name="permission_service_adsense_description">Zezwala aplikacji na dostęp do AdSense przez dowolne powiązane konto Google.</string>
<string name="permission_service_adwords_label">AdWords</string>
<string name="permission_service_adwords_description">Zezwala aplikacji na dostęp do AdWords przez dowolne powiązane konto Google.</string>
<string name="permission_service_ah_label">Google App Engine</string>
<string name="permission_service_ah_description">Zezwala aplikacji na dostęp do Google App Engine przez dowolne powiązane konto Google.</string>
<string name="permission_service_blogger_label">Blogger</string>
<string name="permission_service_blogger_description">Zezwala aplikacji na dostęp do Bloggera przez dowolne powiązane konto Google.</string>
<string name="permission_service_cl_label">Kalendarz Google</string>
<string name="permission_service_cl_description">Zezwala aplikacji na dostęp do Kalendarza Google przez dowolne powiązane konto Google.</string>
<string name="permission_service_cp_label">Kontakty</string>
<string name="permission_service_cp_description">Zezwala aplikacji na dostęp do Kontaktów przez dowolne powiązane konto Google.</string>
<string name="permission_service_dodgeball_label">Dodgeball</string>
<string name="permission_service_dodgeball_description">Zezwala aplikacji na dostęp do Dodgeballa przez dowolne powiązane konto Google.</string>
<string name="permission_service_finance_label">Finanse Google</string>
<string name="permission_service_finance_description">Zezwala aplikacji na dostęp do Finansów Google przez dowolne powiązane konto Google.</string>
<string name="permission_service_gbase_label">Google Base</string>
<string name="permission_service_gbase_description">Zezwala aplikacji na dostęp do Google Base przez dowolne powiązane konto Google.</string>
<string name="permission_service_grandcentral_label">Google Voice</string>
<string name="permission_service_grandcentral_description">Zezwala aplikacji na dostęp do Google Voice przez dowolne powiązane konto Google.</string>
<string name="permission_service_groups2_label">Grupy dyskusyjne Google</string>
<string name="permission_service_groups2_description">Zezwala aplikacji na dostęp do Grup dyskusyjnych Google przez dowolne powiązane konto Google.</string>
</resources>
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<plurals name="pref_unifiednlp_summary">
<item quantity="one"><xliff:g example=\"1\">%1$d</xliff:g> usługa skonfigurowana</item>
<item quantity="few"><xliff:g example=\"3\">%1$d</xliff:g> usługi skonfigurowane</item>
<item quantity="many"><xliff:g example=\"3\">%1$d</xliff:g> usług skonfigurowanych</item>
<item quantity="other"><xliff:g example=\"3\">%1$d</xliff:g> usług skonfigurowanych</item>
</plurals>
<plurals name="gcm_registered_apps_counter">
<item quantity="one"><xliff:g example=\"1\">%1$d</xliff:g> zarejestrowana aplikacja</item>
<item quantity="few"><xliff:g example=\"123\">%1$d</xliff:g> zarejestrowane aplikacje</item>
<item quantity="many"><xliff:g example=\"123\">%1$d</xliff:g> zarejestrowanych aplikacji</item>
<item quantity="other"><xliff:g example=\"123\">%1$d</xliff:g> zarejestrowanych aplikacji</item>
</plurals>
<plurals name="cond_perm_summary">
<item quantity="one">Nie udzielono uprawnienia niezbędnego do poprawnego funkcjonowania usługi microG.</item>
<item quantity="few">Nie udzielono uprawnień niezbędnych do poprawnego działania usługi microG.</item>
<item quantity="many">Nie udzielono uprawnień niezbędnych do poprawnego działania usługi microG.</item>
<item quantity="other">Nie udzielono uprawnień niezbędnych do poprawnego działania usługi microG.</item>
</plurals>
<plurals name="cond_perm_action">
<item quantity="one">Brakuje wymaganego uprawnienia</item>
<item quantity="few">Brakuje wymaganych uprawnień</item>
<item quantity="many">Brakuje wymaganych uprawnień</item>
<item quantity="other">Brakuje wymaganych uprawnień</item>
</plurals>
</resources>
Loading

0 comments on commit cc338e3

Please sign in to comment.