Skip to content

Commit

Permalink
Merge pull request #482 from Jag-Marcel/i18n-additions
Browse files Browse the repository at this point in the history
i18n additions
  • Loading branch information
andrewtavis authored Aug 1, 2024
2 parents 8731937 + ccff30a commit 74c64fc
Show file tree
Hide file tree
Showing 9 changed files with 664 additions and 575 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ Emojis for the following are chosen based on [gitmoji](https://gitmoji.dev/).

# [Upcoming] Scribe-iOS 3.2.0

# Scribe-iOS 3.1.1

### ✨ New Features

- A warning is added to trying to change the app localization if the user only has one language installed on their device ([#481](https://github.com/scribe-org/Scribe-iOS/issues/481)).

### 🌐 Localization

- Localization strings for English, German, Swedish and Spanish have been added for all remaining app texts ([Scribe-i18n#28](https://github.com/scribe-org/Scribe-i18n/issues/28)).

# Scribe-iOS 3.1.0

### ✨ New Features
Expand Down
9 changes: 5 additions & 4 deletions Scribe/SettingsTab/SettingsTableData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,13 @@ enum SettingsTableData {

var sections = [Section]()

for language in installedKeyboards {
guard let abbreviation = languagesAbbrDict[language] else {
fatalError("Abbreviation not found for language: \(language)")
for lang in installedKeyboards {
guard let abbreviation = languagesAbbrDict[lang] else {
fatalError("Abbreviation not found for language: \(lang)")
}
let key = "_global.\(lang.lowercased())"
let newSection = Section(
sectionTitle: NSLocalizedString("_global.\(language.lowercased())", value: language, comment: ""),
sectionTitle: NSLocalizedString(key, value: language, comment: ""),
sectionState: .specificLang(abbreviation)
)

Expand Down
3 changes: 2 additions & 1 deletion Scribe/TipCard/TipCardView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ struct TipCardView: View {
@Binding var tipCardState: Bool
var onDismiss: (() -> Void)?

let ok = "OK"
var body: some View {
ZStack {
RoundedRectangle(cornerRadius: cardCornerRadius)
Expand All @@ -45,7 +46,7 @@ struct TipCardView: View {
tipCardState = false
self.onDismiss?()
} label: {
Text("OK")
Text(ok)
.foregroundColor(.white)
}
.frame(width: leadingPadding, height: leadingPadding)
Expand Down
10 changes: 7 additions & 3 deletions Scribe/i18n/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ Check out Scribe's [architecture diagrams](https://github.com/scribe-org/Organiz

# **Contents**

- [Localization Coverage](#localization-coverage)
- [Localization coverage](#localization-coverage)
- [Contributing](#contributing)
- [Community](#community)

<a id="localization-coverage"></a>

# Localization Coverage [``](#contents)
# Localization coverage [``](#contents)

<a href="https://hosted.weblate.org/projects/scribe/scribe-i18n">
<img src="https://hosted.weblate.org/widget/scribe/scribe-i18n/multi-auto.svg" alt="Translation status" />
Expand Down Expand Up @@ -74,10 +74,14 @@ The [issue tracker for Scribe-i18n](https://github.com/scribe-org/Scribe-i18n/is

5. Hit `Save and continue` when you're ready to move to the next string

6. Maintainers will open up pull requests from [Weblate](https://weblate.org/en/) to this repo
6. Maintainers will open up pull requests from [Weblate](https://weblate.org/en/) to the Scribe-i18n repo to bring in the new strings

- Changes are also automatically sent every 24 hours

7. Scribe-i18n directories that are [Git subtrees](https://docs.github.com/en/get-started/using-git/about-git-subtree-merges) in other Scribe application repos are then synched

Thanks so much for your interest in supporting Scribe's localization!

### Adding source strings [``](#contents)

The base language for all Scribe applications is US English. If you'd like to edit the [en-US.json](https://github.com/scribe-org/Scribe-i18n/blob/main/Scribe-i18n/en-US.json) file, please [fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the repo, clone your fork, and configure the remotes:
Expand Down
Loading

0 comments on commit 74c64fc

Please sign in to comment.