mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-11 18:02:03 +00:00
move new show/hide toolbar settings and do some cleanup
This commit is contained in:
parent
b9451e4f09
commit
4dc0e98321
5 changed files with 27 additions and 21 deletions
|
@ -30,10 +30,6 @@ See [layouts.md](layouts.md#adding-new-layouts--languages) for how to add new la
|
|||
|
||||
See make-emoji-keys tool [README](tools/make-emoji-keys/README.md).
|
||||
|
||||
# Update List of Existing Dictionaries
|
||||
|
||||
See make-dict-list tool [README](tools/make-dict-list/README.md).
|
||||
|
||||
# Translations
|
||||
Translations can be added using [Weblate](https://translate.codeberg.org/projects/heliboard/). You will need an account to update translations and add languages. Add the language you want to translate to in Languages -> Manage translated languages in the top menu bar.
|
||||
Updating translations in a PR will not be accepted, as it may cause conflicts with Weblate translations.
|
||||
|
|
|
@ -108,20 +108,6 @@
|
|||
android:defaultValue="@bool/config_center_suggestion_text_to_enter"
|
||||
android:persistent="true" />
|
||||
|
||||
<SwitchPreference
|
||||
android:key="auto_show_toolbar"
|
||||
android:title="@string/auto_show_toolbar"
|
||||
android:summary="@string/auto_show_toolbar_summary"
|
||||
android:defaultValue="true"
|
||||
android:persistent="true" />
|
||||
|
||||
<SwitchPreference
|
||||
android:key="auto_hide_toolbar"
|
||||
android:title="@string/auto_hide_toolbar"
|
||||
android:summary="@string/auto_hide_toolbar_summary"
|
||||
android:defaultValue="true"
|
||||
android:persistent="true" />
|
||||
|
||||
<SwitchPreference
|
||||
android:key="use_contacts"
|
||||
android:title="@string/use_contacts_dict"
|
||||
|
|
|
@ -28,6 +28,20 @@
|
|||
android:defaultValue="false"
|
||||
android:persistent="true" />
|
||||
|
||||
<SwitchPreference
|
||||
android:key="auto_show_toolbar"
|
||||
android:title="@string/auto_show_toolbar"
|
||||
android:summary="@string/auto_show_toolbar_summary"
|
||||
android:defaultValue="true"
|
||||
android:persistent="true" />
|
||||
|
||||
<SwitchPreference
|
||||
android:key="auto_hide_toolbar"
|
||||
android:title="@string/auto_hide_toolbar"
|
||||
android:summary="@string/auto_hide_toolbar_summary"
|
||||
android:defaultValue="true"
|
||||
android:persistent="true" />
|
||||
|
||||
<SwitchPreference
|
||||
android:key="var_toolbar_direction"
|
||||
android:title="@string/var_toolbar_direction"
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
include ':app'
|
||||
include ':tools:make-emoji-keys'
|
||||
include ':tools:make-dict-list'
|
||||
|
|
|
@ -5,8 +5,16 @@ import os
|
|||
import re
|
||||
|
||||
|
||||
# script for generating information about actual diacritics use from language data
|
||||
# input could be word lists (one word per line), or *-words.txt files from https://www.wortschatz.uni-leipzig.de/en/download
|
||||
# diacritics.txt contains language and in next line diacritics for that language, but should ideally
|
||||
# contain many languages for better results regarding foreign diacritics
|
||||
# resulting data is usage count for language diacritics, and list of words containing non-language diacritics
|
||||
|
||||
|
||||
file_ending_filter = "-words.txt"
|
||||
word_lists_dir = "../../wordlists/"
|
||||
diacritics_file = "../../diacritics.txt"
|
||||
|
||||
|
||||
def find_word_lists(language: str) -> list[str]:
|
||||
|
@ -25,6 +33,9 @@ def check_diacritics(language: str, diacritics: list[str], all_diacritics: set[s
|
|||
word_lists = find_word_lists(language)
|
||||
if len(word_lists) == 0:
|
||||
return
|
||||
report_file = f"diacritics_report_{language}.txt"
|
||||
if os.path.isfile(report_file):
|
||||
return
|
||||
for dia in diacritics:
|
||||
all_diacritics.remove(dia)
|
||||
foreign_dia = "".join(all_diacritics)
|
||||
|
@ -55,7 +66,7 @@ def check_diacritics(language: str, diacritics: list[str], all_diacritics: set[s
|
|||
dia_results = dia_results + f"language diacritics counts: {dia_count}\n"
|
||||
dia_results = dia_results + "foreign diacritics:\n"
|
||||
dia_results = dia_results + "\n".join(foreigns)
|
||||
with open(f"diacritics_report_{language}.txt", 'w') as f:
|
||||
with open(report_file, 'w') as f:
|
||||
f.write(dia_results)
|
||||
|
||||
|
||||
|
@ -70,7 +81,7 @@ def make_all_diacritics(dia_lists: list[list[str]]) -> set[str]:
|
|||
def read_diacritics() -> dict[str, list[str]]:
|
||||
d = dict()
|
||||
language = ""
|
||||
with open("diacritics.txt") as f:
|
||||
with open(diacritics_file) as f:
|
||||
for line in f:
|
||||
if language == "":
|
||||
language = line.strip()
|
||||
|
|
Loading…
Add table
Reference in a new issue