Skip to content

Commit

Permalink
i18n: add credits in app
Browse files Browse the repository at this point in the history
Signed-off-by: Lessica <[email protected]>
  • Loading branch information
Lessica committed Jan 30, 2024
1 parent 147eae3 commit 27aa5ea
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Reveil.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@
0FA0657A2B3D8363000A7ECE /* PresetsHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PresetsHelper.swift; sourceTree = "<group>"; };
0FA065862B42803B000A7ECE /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = "<group>"; };
0FA065882B4282BC000A7ECE /* StandardUserDefaults.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StandardUserDefaults.swift; sourceTree = "<group>"; };
0FCD42972B68BCC400076CE4 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = "<group>"; };
0FD0D2672AE0CB27001DD1E8 /* Entry.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Entry.swift; sourceTree = "<group>"; };
0FD0D2692AE0CD95001DD1E8 /* Dashboard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dashboard.swift; sourceTree = "<group>"; };
0FD0D26B2AE0D39C001DD1E8 /* EntryExporter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EntryExporter.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -887,6 +888,7 @@
en,
Base,
"zh-Hans",
es,
);
mainGroup = CC4AE2AB2ACAA4B400DA23AC;
packageReferences = (
Expand Down Expand Up @@ -1130,6 +1132,7 @@
children = (
CC21B4BE2ACAE5E5003EC114 /* en */,
CC21B4C02ACAE601003EC114 /* zh-Hans */,
0FCD42972B68BCC400076CE4 /* es */,
);
name = Localizable.strings;
sourceTree = "<group>";
Expand Down Expand Up @@ -1304,7 +1307,7 @@
CODE_SIGN_ENTITLEMENTS = Reveil/Reveil.entitlements;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = GXZ23M5TP2;
"ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES;
Expand Down Expand Up @@ -1347,7 +1350,7 @@
CODE_SIGN_ENTITLEMENTS = Reveil/Reveil.entitlements;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = GXZ23M5TP2;
"ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES;
Expand Down
1 change: 1 addition & 0 deletions Reveil.xcodeproj/xcshareddata/xcschemes/Reveil.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = "es"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
12 changes: 12 additions & 0 deletions Reveil/Pages/AboutView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ struct AboutView: View {

@Environment(\.colorScheme) var colorScheme

private static let translatorPage: String = NSLocalizedString("TRANSLATOR_URL", comment: "https://TRANSLATOR_URL")

var body: some View {
ScrollView(.vertical) {
VStack(alignment: .center, spacing: 20) {
Expand Down Expand Up @@ -81,6 +83,16 @@ struct AboutView: View {
)
}

if !Self.translatorPage.hasPrefix("(") {
Link(destination: URL(string: Self.translatorPage)!) {
LinkCell(
label: NSLocalizedString("TRANSLATOR", comment: "Translator"),
description: NSLocalizedString("@TRANSLATOR", comment: "@Translator"),
hasClosure: true
)
}
}

Link(destination: URL(string: "mailto:[email protected]")!) {
LinkCell(
label: NSLocalizedString("CONTACT", comment: "Contact"),
Expand Down
9 changes: 9 additions & 0 deletions Reveil/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/* @Translator */
"@TRANSLATOR" = "(null)";

/* About */
"ABOUT" = "About";

Expand Down Expand Up @@ -952,6 +955,12 @@
/* Process task port was obtained */
"TOUCHED_PROCESS_TASK_PORT" = "Process task port was obtained";

/* Translator */
"TRANSLATOR" = "Translator";

/* https://TRANSLATOR_URL */
"TRANSLATOR_URL" = "(null)";

/* Type */
"TYPE" = "Type";

Expand Down
9 changes: 9 additions & 0 deletions Reveil/es.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/* @Translator */
"@TRANSLATOR" = "@Deci8BelioS";

/* About */
"ABOUT" = "Acerca de";

Expand Down Expand Up @@ -952,6 +955,12 @@
/* Process task port was obtained */
"TOUCHED_PROCESS_TASK_PORT" = "El puerto de tarea del proceso fue obtenido";

/* Translator */
"TRANSLATOR" = "Traductor";

/* https://TRANSLATOR_URL */
"TRANSLATOR_URL" = "https://github.com/Deci8BelioS";

/* Type */
"TYPE" = "Tipo";

Expand Down
9 changes: 9 additions & 0 deletions Reveil/zh-Hans.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/* @Translator */
"@TRANSLATOR" = "(null)";

/* About */
"ABOUT" = "关于";

Expand Down Expand Up @@ -952,6 +955,12 @@
/* Process task port was obtained */
"TOUCHED_PROCESS_TASK_PORT" = "检测到进程任务端口被额外引用";

/* Translator */
"TRANSLATOR" = "本地化";

/* https://TRANSLATOR_URL */
"TRANSLATOR_URL" = "(null)";

/* Type */
"TYPE" = "类型";

Expand Down

0 comments on commit 27aa5ea

Please sign in to comment.