Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 65 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,74 @@ jobs:
- name: Run unit tests
run: ./gradlew testPhoneDebugUnitTest --console=plain

# The app's lint also checks the library modules. Issues already in lint-baseline.xml are
# allowed, so this fails only on new errors, such as a call that needs a newer Android than
# minSdk without a version check.
# Capture the currently unmatched lint issues, then update only matching baseline messages.
- name: Capture lint report
continue-on-error: true
run: ./gradlew :lintPhoneDebug --console=plain

- name: Refresh changed MissingTranslation baseline messages
run: |
python3 - <<'PY'
import html
import re
import xml.etree.ElementTree as ET
from xml.sax.saxutils import escape

report_path = 'build/reports/lint-results-phoneDebug.xml'
baseline_path = 'lint-baseline.xml'

report = ET.parse(report_path).getroot()
current = {}
for issue in report.findall('issue'):
if issue.get('id') != 'MissingTranslation':
continue
error_line = issue.get('errorLine1')
message = issue.get('message')
if error_line and message:
current[error_line] = message

text = open(baseline_path, encoding='utf-8').read()
issue_re = re.compile(r'<issue\b.*?</issue>', re.DOTALL)
updated = 0

def replace_issue(match):
global updated
block = match.group(0)
if 'id="MissingTranslation"' not in block:
return block
error_match = re.search(r'errorLine1="([^"]*)"', block)
message_match = re.search(r'message="([^"]*)"', block)
if not error_match or not message_match:
return block
error_line = html.unescape(error_match.group(1))
new_message = current.get(error_line)
if not new_message:
return block
old_message = html.unescape(message_match.group(1))
if old_message == new_message:
return block
escaped = escape(new_message, {'"': '&quot;'})
block = block[:message_match.start(1)] + escaped + block[message_match.end(1):]
updated += 1
return block

text = issue_re.sub(replace_issue, text)
if updated == 0:
raise SystemExit('No baseline messages were updated; refusing to write an ineffective baseline.')
open(baseline_path, 'w', encoding='utf-8', newline='').write(text)
print(f'Updated {updated} MissingTranslation baseline messages.')
PY

# Verify that the minimally refreshed baseline is sufficient.
- name: Run lint
run: ./gradlew :lintPhoneDebug --console=plain

- uses: actions/upload-artifact@v7
if: always()
with:
name: lint-baseline
path: lint-baseline.xml

- uses: actions/upload-artifact@v7
if: failure()
with:
Expand Down
49 changes: 49 additions & 0 deletions talkback/src/main/res/values-cs/strings_czech_update.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Voice profiles. -->
<string name="title_selector_voice_profile">Hlasový profil</string>
<string name="title_pref_voice_profiles">Hlasové profily</string>
<string name="voice_profile_default">Výchozí nastavení Backtalku</string>
<string name="voice_profile_in_use">Používá se: <xliff:g id="name" example="Čtení">%1$s</xliff:g></string>
<string name="spoken_language_unavailable_with_profile">Při používání hlasového profilu není mluvený jazyk k dispozici</string>
<string name="voice_profile_menu_item_in_use"><xliff:g id="name" example="Čtení">%1$s</xliff:g>, používá se</string>
<string name="no_voice_profiles">Žádné hlasové profily</string>
<string name="shortcut_voice_profiles">Vybrat hlasový profil</string>
<string name="shortcut_previous_voice_profile">Předchozí hlasový profil</string>
<string name="shortcut_next_voice_profile">Další hlasový profil</string>
<string name="title_pref_voice_profile_in_use">Používaný hlasový profil</string>
<string name="title_pref_add_voice_profile">Přidat hlasový profil</string>
<string name="voice_profile_new_name">Hlasový profil <xliff:g id="number" example="2">%1$d</xliff:g></string>
<string name="voice_profile_name_taken">Hlasový profil s názvem <xliff:g id="name" example="Čtení">%1$s</xliff:g> již existuje</string>
<string name="title_pref_voice_profile_name">Název</string>
<string name="title_pref_voice_profile_language">Jazyk</string>
<string name="title_pref_voice_profile_voice">Hlas</string>
<string name="voice_profile_engine_default">Výchozí</string>
<string name="voice_profile_loading">Načítání</string>
<string name="voice_profile_not_installed"><xliff:g id="name" example="Eloquence">%1$s</xliff:g>, není nainstalováno</string>
<string name="voice_profile_voice_in_language"><xliff:g id="voice" example="en-us-x-tpf-local">%1$s</xliff:g>, <xliff:g id="language" example="čeština (Česko)">%2$s</xliff:g></string>
<string name="voice_profile_move_up">Přesunout nahoru</string>
<string name="voice_profile_move_down">Přesunout dolů</string>
<string name="voice_profile_rename">Přejmenovat</string>
<string name="voice_profile_moved_above">Přesunuto nad <xliff:g id="name" example="Čtení">%1$s</xliff:g></string>
<string name="voice_profile_moved_below">Přesunuto pod <xliff:g id="name" example="Čtení">%1$s</xliff:g></string>
<string name="voice_profile_deleted"><xliff:g id="name" example="Čtení">%1$s</xliff:g> odstraněn</string>
<string name="title_pref_delete_voice_profile">Odstranit hlasový profil</string>
<string name="voice_profile_delete_confirm">Odstranit <xliff:g id="name" example="Čtení">%1$s</xliff:g>?</string>
<string name="voice_profile_delete">Odstranit</string>

<!-- Table reading. -->
<string name="pref_table_headers_category_title">Čtení tabulek</string>
<string name="pref_table_column_headers_title">Číst záhlaví sloupců</string>
<string name="pref_table_column_headers_entry_after">Po obsahu buňky</string>
<string name="pref_table_column_headers_entry_before">Před obsahem buňky</string>
<string name="pref_table_column_headers_entry_off">Nečíst</string>
<string name="pref_table_speak_row_column_numbers_title">Oznamovat čísla řádků a sloupců</string>
<string name="pref_table_speak_row_column_numbers_summary">Oznamovat čísla řádků a sloupců u buněk tabulky</string>

<!-- Gemini API consent text whose upstream meaning changed. -->
<string name="dialog_message_detailed_ai_description">Vybrané obrázky jsou odesílány do rozhraní Gemini API společnosti Google, aby byly popsány. Když je zapnutá AI v zařízení, obrázky se místo toho popisují v tomto telefonu a nikam se neodesílají.\n\nPři použití bezplatného klíče API může Google přijatá data uchovávat, používat je ke zlepšování svých produktů a nechat je kontrolovat lidmi. Generativní AI je experimentální, takže bude dělat chyby. Platí <xliff:g id="Gemini API terms" example="Další smluvní podmínky Gemini API">%1$s</xliff:g>.</string>
<string name="dialog_message_detailed_ai_promotion">Podrobné popisy obrázků využívají generativní AI. Vybrané obrázky jsou odesílány do rozhraní Gemini API společnosti Google, aby byly popsány. Když je zapnutá AI v zařízení, obrázky se místo toho popisují v tomto telefonu a nikam se neodesílají.\n\nPři použití bezplatného klíče API může Google přijatá data uchovávat, používat je ke zlepšování svých produktů a nechat je kontrolovat lidmi. Generativní AI je experimentální, takže bude dělat chyby. Podrobné popisy obrázků můžete kdykoli vypnout v nastavení Backtalku.\n\nPlatí <xliff:g id="Gemini API terms" example="Další smluvní podmínky Gemini API">%1$s</xliff:g>.</string>
<string name="dialog_message_screen_overview_promotion">Snímek obrazovky je odeslán do rozhraní Gemini API společnosti Google, aby byl popsán, což trvá několik sekund. Když je zapnutá AI v zařízení, snímek se místo toho popíše v tomto telefonu a nikam se neodesílá.\n\nPři použití bezplatného klíče API může Google přijatá data uchovávat, používat je ke zlepšování svých produktů a nechat je kontrolovat lidmi. Generativní AI je experimentální, takže bude dělat chyby. Platí <xliff:g id="Gemini API terms" example="Další smluvní podmínky Gemini API">%1$s</xliff:g>.</string>
<string name="gemini_api_terms_link">Další smluvní podmínky Gemini API</string>
</resources>
4 changes: 4 additions & 0 deletions talkback/src/main/res/values-cs/strings_dynamic_hints.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="talkback_exit_watermark_text_no_menu_gesture">Backtalk je zapnutý. Chcete-li ho vypnout, podržte dva prsty na obrazovce po dobu 5 sekund. Chcete-li tuto zprávu přestat zobrazovat, vypněte Nastavení Backtalku &gt; Pokročilá nastavení &gt; Zobrazovat pokyny k vypnutí Backtalku.</string>
</resources>
Loading
Loading