generated from element-hq/.github
-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into mauroromito/enabling_push_notifications
- Loading branch information
Showing
17 changed files
with
664 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Open Translations PR | ||
on: | ||
schedule: | ||
# At 00:00 on every Monday UTC | ||
- cron: '0 0 * * 1' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
open-translations-pr: | ||
runs-on: macos-12 | ||
# Skip in forks | ||
if: github.repository == 'vector-im/element-x-ios' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Localazy and Mint | ||
run: brew install mint localazy/tools/localazy | ||
|
||
- name: Download All Translations | ||
run: swift run tools download-strings --all-languages | ||
|
||
- name: Verify Translations | ||
run: swift run tools locheck | ||
|
||
- name: Create PR for Translations | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
commit-message: Translations update | ||
title: Translations update | ||
body: | | ||
- Translations update | ||
branch: translations/update | ||
base: develop | ||
add-paths: | | ||
*.strings | ||
*.stringsdict |
281 changes: 281 additions & 0 deletions
281
ElementX/Resources/Localizations/es.lproj/Localizable.strings
Large diffs are not rendered by default.
Oops, something went wrong.
54 changes: 54 additions & 0 deletions
54
ElementX/Resources/Localizations/es.lproj/Localizable.stringsdict
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>common_member_count</key> | ||
<dict> | ||
<key>NSStringLocalizedFormatKey</key> | ||
<string>%#@COUNT@</string> | ||
<key>COUNT</key> | ||
<dict> | ||
<key>NSStringFormatSpecTypeKey</key> | ||
<string>NSStringPluralRuleType</string> | ||
<key>NSStringFormatValueTypeKey</key> | ||
<string>d</string> | ||
<key>one</key> | ||
<string>%1$d miembro</string> | ||
<key>other</key> | ||
<string>%1$d miembros</string> | ||
</dict> | ||
</dict> | ||
<key>room_timeline_state_changes</key> | ||
<dict> | ||
<key>NSStringLocalizedFormatKey</key> | ||
<string>%#@COUNT@</string> | ||
<key>COUNT</key> | ||
<dict> | ||
<key>NSStringFormatSpecTypeKey</key> | ||
<string>NSStringPluralRuleType</string> | ||
<key>NSStringFormatValueTypeKey</key> | ||
<string>d</string> | ||
<key>one</key> | ||
<string>%1$d cambio en la sala</string> | ||
<key>other</key> | ||
<string>%1$d cambios en la sala</string> | ||
</dict> | ||
</dict> | ||
<key>screen_room_member_list_header_title</key> | ||
<dict> | ||
<key>NSStringLocalizedFormatKey</key> | ||
<string>%#@COUNT@</string> | ||
<key>COUNT</key> | ||
<dict> | ||
<key>NSStringFormatSpecTypeKey</key> | ||
<string>NSStringPluralRuleType</string> | ||
<key>NSStringFormatValueTypeKey</key> | ||
<string>d</string> | ||
<key>one</key> | ||
<string>Una persona</string> | ||
<key>other</key> | ||
<string>%1$d personas</string> | ||
</dict> | ||
</dict> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
266 changes: 133 additions & 133 deletions
266
ElementX/Resources/Localizations/ro.lproj/Localizable.strings
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import ArgumentParser | ||
import Foundation | ||
|
||
struct DownloadStrings: ParsableCommand { | ||
static var configuration = CommandConfiguration(abstract: "A tool to download localizable strings from localazy") | ||
|
||
@Flag(help: "Use to download translation keys for all languages") | ||
var allLanguages = false | ||
|
||
func run() throws { | ||
try localazyDownload() | ||
} | ||
|
||
private func localazyDownload() throws { | ||
let json = allLanguages ? "localazy-all.json" : "localazy-en.json" | ||
try Utilities.zsh("localazy download --config \(json)") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import ArgumentParser | ||
import Foundation | ||
|
||
struct Locheck: ParsableCommand { | ||
enum LocheckError: LocalizedError { | ||
case missingMint | ||
case outputError | ||
|
||
var errorDescription: String? { | ||
switch self { | ||
case .missingMint: | ||
return "💥 Unable to find mint. Fix by running:\nbrew install mint\n" | ||
case .outputError: | ||
return "💥 Failed to read the output from locheck." | ||
} | ||
} | ||
} | ||
|
||
static var configuration = CommandConfiguration(abstract: "A tool that verifies bad strings contained in localization files") | ||
|
||
private var stringsDirectoryURL: URL { | ||
Utilities.projectDirectoryURL.appendingPathComponent("ElementX/Resources/Localizations") | ||
} | ||
|
||
func run() throws { | ||
try checkMint() | ||
try checkStrings() | ||
} | ||
|
||
func checkStrings() throws { | ||
guard let output = try Utilities.zsh("mint run locheck discoverlproj --ignore-missing --ignore lproj_file_missing_from_translation --treat-warnings-as-errors \(stringsDirectoryURL.path)") else { | ||
throw LocheckError.missingMint | ||
} | ||
print(output) | ||
} | ||
|
||
private func checkMint() throws { | ||
let result = try Utilities.zsh("which mint") | ||
|
||
if result?.contains("not found") == true { | ||
throw LocheckError.missingMint | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.