Skip to content

Commit

Permalink
Add locheck run script to Riot target. (#6069)
Browse files Browse the repository at this point in the history
* Add a locheck pre-build step to find all .strings errors.
* Treat locheck warnings as errors.
* Install mint on CI and pin locheck version.
* Clean up localised strings with invalid formatting
  • Loading branch information
pixlwave committed Apr 26, 2022
1 parent c8fccea commit 1381335
Show file tree
Hide file tree
Showing 76 changed files with 748 additions and 969 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@ jobs:

# Common setup
# Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job
- name: Brew bundle
run: brew bundle
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
bundle install --jobs 4 --retry 3
- name: Use right MatrixSDK versions
run: bundle exec fastlane point_dependencies_to_related_branches

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ jobs:

# Common setup
# Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job
- name: Brew bundle
run: brew bundle
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
bundle install --jobs 4 --retry 3
- name: Use right MatrixSDK versions
run: bundle exec fastlane point_dependencies_to_related_branches

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ci-ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ jobs:

# Common setup
# Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job
- name: Brew bundle
run: brew bundle
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
bundle install --jobs 4 --retry 3
- name: Use right MatrixSDK versions
run: bundle exec fastlane point_dependencies_to_related_branches

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release-alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ jobs:

# Common setup
# Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job
- name: Brew bundle
run: brew bundle
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Use right MatrixSDK versions
run: bundle exec fastlane point_dependencies_to_related_branches

Expand Down
2 changes: 2 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
brew "xcodegen"
brew "mint"
91 changes: 91 additions & 0 deletions Brewfile.lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"entries": {
"brew": {
"xcodegen": {
"version": "2.28.0",
"bottle": {
"rebuild": 0,
"root_url": "https://ghcr.io/v2/homebrew/core",
"files": {
"arm64_monterey": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:fa493f26e65f0bb0c6be559a395efb84009d842d55035c8fcfd7bcc35096fd17",
"sha256": "fa493f26e65f0bb0c6be559a395efb84009d842d55035c8fcfd7bcc35096fd17"
},
"arm64_big_sur": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:54ce7cba17293f6eabd644af8c8855ca5ac46f4e8475e5a1a961053d31061210",
"sha256": "54ce7cba17293f6eabd644af8c8855ca5ac46f4e8475e5a1a961053d31061210"
},
"monterey": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:261df12ea22b281c6683113755a95887213aec51a345851d3671eec6a82dd169",
"sha256": "261df12ea22b281c6683113755a95887213aec51a345851d3671eec6a82dd169"
},
"big_sur": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:24936b2f648842c026cc0da57ac4d2a04669a1bd459af06d20acfbfa3a1c33da",
"sha256": "24936b2f648842c026cc0da57ac4d2a04669a1bd459af06d20acfbfa3a1c33da"
},
"catalina": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/xcodegen/blobs/sha256:d7b4298a5833f5c2abaa8f19cd60f1da2f13379b9534d67746ac5a37b754e1bd",
"sha256": "d7b4298a5833f5c2abaa8f19cd60f1da2f13379b9534d67746ac5a37b754e1bd"
}
}
}
},
"mint": {
"version": "0.17.1",
"bottle": {
"rebuild": 0,
"root_url": "https://ghcr.io/v2/homebrew/core",
"files": {
"arm64_monterey": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/mint/blobs/sha256:1c0ec84137dd50cf949a68e1b8d3729956e2843e1cc48c6827d26e6d7dbc74fc",
"sha256": "1c0ec84137dd50cf949a68e1b8d3729956e2843e1cc48c6827d26e6d7dbc74fc"
},
"arm64_big_sur": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/mint/blobs/sha256:c57aaea4b6eb863ef946bafe3a77f3d32ad4e10e05876b7c6b2df8f8b9656f4e",
"sha256": "c57aaea4b6eb863ef946bafe3a77f3d32ad4e10e05876b7c6b2df8f8b9656f4e"
},
"monterey": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/mint/blobs/sha256:5faf98e60b6d18332bcac4ab076f6ba861ee7daea4c23a85f97e6c8fa3d1f463",
"sha256": "5faf98e60b6d18332bcac4ab076f6ba861ee7daea4c23a85f97e6c8fa3d1f463"
},
"big_sur": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/mint/blobs/sha256:3ccf422821dd5fc82488f8e0ab2a11efb645901527b8cf9c42979cc152a9ce02",
"sha256": "3ccf422821dd5fc82488f8e0ab2a11efb645901527b8cf9c42979cc152a9ce02"
},
"catalina": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/mint/blobs/sha256:d09ea36619994628564fb3d7e8e71b8c368c59f68e29174fb84b9b127bd9290e",
"sha256": "d09ea36619994628564fb3d7e8e71b8c368c59f68e29174fb84b9b127bd9290e"
},
"x86_64_linux": {
"cellar": "/home/linuxbrew/.linuxbrew/Cellar",
"url": "https://ghcr.io/v2/homebrew/core/mint/blobs/sha256:1d73dd0102396a53abac4721557dc7d7c2897bdb0e95551e04869c48d11df764",
"sha256": "1d73dd0102396a53abac4721557dc7d7c2897bdb0e95551e04869c48d11df764"
}
}
}
}
}
},
"system": {
"macos": {
"monterey": {
"HOMEBREW_VERSION": "3.4.8",
"HOMEBREW_PREFIX": "/opt/homebrew",
"Homebrew/homebrew-core": "c56787cde0b726d961c1949aca8548551133975e",
"CLT": "",
"Xcode": "13.3",
"macOS": "12.3.1"
}
}
}
}
7 changes: 4 additions & 3 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ To build Element iOS project you need:
- [Ruby](https://www.ruby-lang.org/), a dynamic programming language used by several build tools.
- [CocoaPods](https://cocoapods.org), library dependencies manager for Xcode projects.
- [XcodeGen](https://github.com/yonaskolb/XcodeGen), an Xcode project generator.
- [Mint](https://github.com/yonaskolb/Mint), a package manager that installs and runs executable Swift packages
- [bundler](https://bundler.io/) (optional), is also a dependency manager used to manage build tools dependency (CocoaPods, Fastlane).

### Install Ruby
Expand All @@ -26,12 +27,12 @@ $ gem install cocoapods

In the last case please ensure that you are using the same version as indicated at the end of the `Podfile.lock` file.

### Install XcodeGen
### Install XcodeGen and Mint

You can directly install XcodeGen with [Homebrew](https://brew.sh) or RubyGems:
You can install XcodeGen and Mint using the included [Homebrew](https://brew.sh) Brewfile:

```
$ brew install xcodegen
$ brew bundle
```

### Install bundler (optional)
Expand Down
1 change: 0 additions & 1 deletion Riot/Assets/ar.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
/** Image Messages **/

/* New action message from a specific person, not referencing a room. */
"IMAGE_FROM_USER" = "لَقَد أرسَلَ %@ صُّورة %@";

/* New action message from a specific person in a named room. */
"ACTION_FROM_USER_IN_ROOM" = "العُضو %@: * %@ %@";
Expand Down
1 change: 0 additions & 1 deletion Riot/Assets/bg.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
/* New action message from a specific person in a named room. */
"ACTION_FROM_USER_IN_ROOM" = "%@: * %@ %@";
/* New action message from a specific person, not referencing a room. */
"IMAGE_FROM_USER" = "%@ изпрати снимка %@";
/* New action message from a specific person in a named room. */
"IMAGE_FROM_USER_IN_ROOM" = "%@ публикува снимка %@ в %@";
/* A single unread message in a room */
Expand Down
13 changes: 0 additions & 13 deletions Riot/Assets/bg.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,6 @@
"network_offline_prompt" = "Интернет връзката изглежда не работи.";
"public_room_section_title" = "Публични стаи (в %@):";
"bug_report_prompt" = "Приложението спря да работи последния път. Искате ли да изпратите съобщение за грешка?";
"rage_shake_prompt" = "Изглежда, че разклащате телефона, което ни кара да мислим, че не сте доволни от %@. Искате ли да изпратите съобщение за грешка?";
"do_not_ask_again" = "Не питай отново";
"camera_access_not_granted" = "%@ няма разрешение да използва камерата. Моля, проверете настройките за сигурност";
"large_badge_value_k_format" = "%.1fK";
Expand All @@ -469,7 +468,6 @@
"bug_report_send" = "Изпрати";
"no_voip" = "%@ Ви се обажда, но %@ все още не поддържа разговори.\nМожете да пренебрегнете това известие и да отговорите на това позвъняване от друго устройство или да го откажете.";
// Crash report
"google_analytics_use_prompt" = "Искате ли да помогнете за подобрението на %@ като анонимно изпращате съобщения за грешки и данни за използване?";
// Crypto
"e2e_enabling_on_app_update" = "%@ поддържа шифроване от край до край, но за да го включите трябва да влезете в профила си отново.\n\nМоже да го направите сега или по-късно от настройките на приложението.";
"e2e_need_log_in_again" = "Трябва да влезете обратно в профила си, за да се създадат ключове за шифроване от-край-до-край за тази сесия и да се изпрати публичния ключ към Home сървъра.\nТова е еднократно. Извинете за неудобството.";
Expand Down Expand Up @@ -560,7 +558,6 @@
"settings_key_backup_info_not_valid" = "Тази сесия не прави резервно копие на ключовете Ви, но имате съществуващо резервно копие, от което да възстановявате или допълвате в бъдеще.";
"settings_key_backup_info_progress" = "Правене на резервно копие на %@ ключа…";
"settings_key_backup_info_progress_done" = "Има резервно копие на всички ключове";
"settings_key_backup_info_not_trusted_from_verifiable_device_fix_action" = "За да използвате Възстановяване на Защитени Съобщения на това устройство, потвърдете %@ сега.";
"settings_key_backup_info_not_trusted_fix_action" = "За да използвате Възстановяване на Защитени Съобщения на това устройство, въведете паролата си или ключа за възстановяване.";
"settings_key_backup_info_trust_signature_unknown" = "Резервното копие има подпис от сесия с идентификатор: %@";
"settings_key_backup_info_trust_signature_valid" = "Резервното копие има валиден подпис от текущата сесия";
Expand Down Expand Up @@ -671,10 +668,6 @@
"room_event_action_reply" = "Отговори";
"room_event_action_edit" = "Редактирай";
"auth_login_single_sign_on" = "Вход";
"room_event_action_reaction_agree" = "Съгласи се с %@";
"room_event_action_reaction_disagree" = "Противоречи на %@";
"room_event_action_reaction_like" = "Харесай %@";
"room_event_action_reaction_dislike" = "Не харесай %@";
"room_action_reply" = "Отговори";
"settings_labs_message_reaction" = "Реагирай на съобщения с емоджи";
"settings_key_backup_button_connect" = "Свържи сесията към резервно копие на ключове";
Expand Down Expand Up @@ -820,7 +813,6 @@
"room_participants_start_new_chat_error_using_user_email_without_identity_server" = "Не е конфигуриран сървър за самоличност, така че не можете да започнете чат с контакт посредством имейл адрес.";
// Service terms
"service_terms_modal_title" = "Условия за ползване";
"service_terms_modal_message" = "За да продължите, трябва да приемете Условията за ползване на тази услуга (%@).";
"service_terms_modal_accept_button" = "Приеми";
"service_terms_modal_description_for_identity_server" = "Бъдете откриваеми от потребители";
"service_terms_modal_description_for_integration_manager" = "Използвайте ботове, връзки към други мрежи и стикери";
Expand Down Expand Up @@ -879,7 +871,6 @@
"settings_identity_server_no_is_description" = "В момента не използвате сървър за самоличност. Добавете такъв по-горе, за да откривате и бъдете откриваеми от съществуващи ваши контакти.";
// Identity server settings
"identity_server_settings_title" = "Сървър за самоличност";
"identity_server_settings_description" = "В момента използвате %2 за да откривате и да бъдете открити от съществуващи ваши контакти.";
"identity_server_settings_no_is_description" = "В момента не използвате сървър за самоличност. Добавете такъв по-горе, за да откривате и бъдете открити от съществуващи ваши контакти.";
"identity_server_settings_place_holder" = "Въведете сървър за самоличност";
"identity_server_settings_add" = "Добави";
Expand All @@ -906,7 +897,6 @@
"service_terms_modal_description_for_identity_server_2" = "Бъдете откриваеми по телефон или имейл";
// Service terms - Variant for identity server when displayed out of a context
"service_terms_modal_title_identity_server" = "Откриване на контакти";
"service_terms_modal_message_identity_server" = "Приемете условията на сървъра за самоличност (%@) за да откривате контакти.";
// Generic errors
"error_invite_3pid_with_no_identity_server" = "Добавете сървър за самоличност в настройки за да каните по имейл.";
"error_not_supported_on_mobile" = "Не може да правите това от %@ мобилен телефон.";
Expand Down Expand Up @@ -1348,7 +1338,6 @@
"event_formatter_call_you_missed" = "Пропуснахте това обаждане";
"event_formatter_call_you_declined" = "Отказахте разговора";
"event_formatter_call_you_currently_in" = "Активен разговор";
"event_formatter_call_has_ended" = "Прекратяване на %@";
"event_formatter_call_ringing" = "Звънене…";
"event_formatter_call_connecting" = "Свързване…";
"event_formatter_call_video" = "Видео разговор";
Expand Down Expand Up @@ -1481,7 +1470,6 @@
"notice_room_aliases" = "Адресите на стаята са: %@";
"notice_room_related_groups" = "Групите, асоциирани с тази стая, са: %@";
"notice_encrypted_message" = "Шифровано съобщение";
"notice_encryption_enabled" = "%@ включи шифроването от край до край (алгоритъм %@)";
"notice_image_attachment" = "прикачена снимка";
"notice_audio_attachment" = "прикачено аудио";
"notice_video_attachment" = "прикачено видео";
Expand All @@ -1503,7 +1491,6 @@
// room display name
"room_displayname_empty_room" = "Празна стая";
"room_displayname_two_members" = "%@ и %@";
"room_displayname_more_than_two_members" = "%@ и %u други";
// Settings
"settings" = "Настройки";
"settings_enable_inapp_notifications" = "Включване на известия в приложението";
Expand Down
1 change: 0 additions & 1 deletion Riot/Assets/ca.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
/* New action message from a specific person in a named room. */
"ACTION_FROM_USER_IN_ROOM" = "%@: * %@ %@";
/* New action message from a specific person, not referencing a room. */
"IMAGE_FROM_USER" = "%@ ha enviat una foto %@";
/* New action message from a specific person in a named room. */
"IMAGE_FROM_USER_IN_ROOM" = "%@ ha publicat una foto %@ a %@";
/* Multiple unread messages in a room */
Expand Down
4 changes: 0 additions & 4 deletions Riot/Assets/ca.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@
"settings_report_bug" = "Informa d'un error";
"settings_config_home_server" = "El servidor hoste és %@";
"settings_config_identity_server" = "El servidor d'identitat és %@";
"settings_config_user_id" = "Sessió iniciada com";
"settings_user_settings" = "Ajustos d'usuari";
"settings_notifications_settings" = "Ajustos de notificacions";
"settings_calls_settings" = "Trucades";
Expand Down Expand Up @@ -463,7 +462,6 @@
"no_voip_title" = "Trucada entrant";
"no_voip" = "%@ t'està trucant però %@ encara no suporta trucades.\nPots ignorar aquesta notificació i respondre la trucada des de un altre dispositiu o pots rebutjar-la.";
// Crash report
"google_analytics_use_prompt" = "T'agradaria ajudar a millorar %@ enviant automàticament informes de bloquejos i ús de dades?";
// Crypto
"e2e_enabling_on_app_update" = "%@ ara permet l'ús de xifrat punt a punt però has de tornar a connectar-te per tal d'activar-lo.\n\nPots fer-ho ara o més tard des de les preferències de l'aplicació.";
"e2e_need_log_in_again" = "Has de tornar a iniciar sessió per tal de generar claus de xifrat punt a punt per a aquest dispositiu i enviar la clau pública al servidor.\nAixò només s'ha de fer un cop, disculpa les molèsties.";
Expand Down Expand Up @@ -647,7 +645,6 @@
"notice_room_aliases" = "Els àlies de la sala són: %@";
"notice_room_related_groups" = "Els grups associats amb aquesta sala són: %@";
"notice_encrypted_message" = "Missatge xifrat";
"notice_encryption_enabled" = "%@ ha activat el xifrat punt a punt (algoritme %@)";
"notice_image_attachment" = "adjunt d'imatge";
"notice_audio_attachment" = "adjunt d'àudio";
"notice_video_attachment" = "adjunt de vídeo";
Expand All @@ -669,7 +666,6 @@
// room display name
"room_displayname_empty_room" = "Sala buida";
"room_displayname_two_members" = "%@ i %@";
"room_displayname_more_than_two_members" = "%@ i %u més";
// Settings
"settings" = "Configuració";
"settings_enable_inapp_notifications" = "Habilitar les notificacions de les App integrades";
Expand Down
Loading

0 comments on commit 1381335

Please sign in to comment.