Skip to content

Commit

Permalink
Added Slovak language support.
Browse files Browse the repository at this point in the history
  • Loading branch information
jensutbult committed Nov 22, 2024
1 parent 527c373 commit 6443430
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions Authenticator.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,7 @@
Base,
fr,
ja,
sk,
);
mainGroup = 818866AA22DFD729006BC0A8;
packageReferences = (
Expand Down
21 changes: 21 additions & 0 deletions Authenticator/UI/About/AboutView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ struct AboutView: View {
.multilineTextAlignment(.center)
Text("\(UIApplication.appVersion) (build \(UIApplication.appBuildNumber))")
.font(.body)
AboutLanguageView()
}
.frame(maxWidth: .infinity)
.padding(.top, 10)
Expand Down Expand Up @@ -114,3 +115,23 @@ struct AboutView: View {
}
}

struct AboutLanguageView: View {

var shouldShowLanguageNote: Bool {
guard let langCode = Bundle.main.preferredLocalizations.first else { return false }
return langCode.lowercased() == "sk"
}

var body: some View {
if shouldShowLanguageNote {
Text("This translation is a community effort, please visit [crowdin.com](https://crowdin.com/project/yubico-authenticator-ios) to contribute.")
.multilineTextAlignment(.center)
.font(.footnote)
.foregroundStyle(.secondary)
.padding(.top, 15)
} else {
EmptyView()
}
}

}

0 comments on commit 6443430

Please sign in to comment.