Skip to content

Commit

Permalink
[trello.com/c/yd3JjZ1f] feat: add chinese localization
Browse files Browse the repository at this point in the history
  • Loading branch information
StanislavDevIOS committed Jan 10, 2024
1 parent 07d3b2e commit d2fa7ef
Show file tree
Hide file tree
Showing 10 changed files with 1,289 additions and 2 deletions.
7 changes: 7 additions & 0 deletions Adamant.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,9 @@
3AA50DEE2AEBE65D00C58FC8 /* PartnerQRView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PartnerQRView.swift; sourceTree = "<group>"; };
3AA50DF02AEBE66A00C58FC8 /* PartnerQRViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PartnerQRViewModel.swift; sourceTree = "<group>"; };
3AA50DF22AEBE67C00C58FC8 /* PartnerQRFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PartnerQRFactory.swift; sourceTree = "<group>"; };
3AF08D5B2B4E7FFC00EB82B1 /* zh */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh; path = zh.lproj/InfoPlist.strings; sourceTree = "<group>"; };
3AF08D5C2B4E7FFC00EB82B1 /* zh */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = zh; path = zh.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
3AF08D5D2B4E7FFC00EB82B1 /* zh */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh; path = zh.lproj/Localizable.strings; sourceTree = "<group>"; };
41047B6F294B5EE10039E956 /* VisibleWalletsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VisibleWalletsViewController.swift; sourceTree = "<group>"; };
41047B71294B5F210039E956 /* VisibleWalletsTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VisibleWalletsTableViewCell.swift; sourceTree = "<group>"; };
41047B73294C61D10039E956 /* VisibleWalletsService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VisibleWalletsService.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2702,6 +2705,7 @@
ru,
de,
Base,
zh,
);
mainGroup = E913C8E51FFFA51D001A83F7;
packageReferences = (
Expand Down Expand Up @@ -3454,6 +3458,7 @@
93E123302A6DF8EF004DF33B /* en */,
93E123322A6DF8F1004DF33B /* de */,
93E123332A6DF8F2004DF33B /* ru */,
3AF08D5B2B4E7FFC00EB82B1 /* zh */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
Expand All @@ -3464,6 +3469,7 @@
93E123392A6DFD15004DF33B /* de */,
93E1233B2A6DFD18004DF33B /* ru */,
93E1233C2A6DFD19004DF33B /* en */,
3AF08D5D2B4E7FFC00EB82B1 /* zh */,
);
name = Localizable.strings;
sourceTree = "<group>";
Expand All @@ -3474,6 +3480,7 @@
93E123402A6DFE24004DF33B /* en */,
93E123422A6DFE27004DF33B /* de */,
93E123432A6DFE2E004DF33B /* ru */,
3AF08D5C2B4E7FFC00EB82B1 /* zh */,
);
name = Localizable.stringsdict;
sourceTree = "<group>";
Expand Down
11 changes: 9 additions & 2 deletions Adamant/Modules/Onboard/OnboardOverlay.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ final class OnboardOverlay: SwiftyOnboardOverlay {

lazy var agreeLabel: UILabel = {
let view = UILabel()
view.text = " I accept"
view.text = " \(String.adamant.Onboard.agreeLabel)"
view.font = UIFont.adamantPrimary(ofSize: 18)//UIFont(name: "Exo2-Regular", size: 18)
view.textColor = UIColor.adamant.textColor
return view
Expand All @@ -30,7 +30,7 @@ final class OnboardOverlay: SwiftyOnboardOverlay {
let button = UIButton(type: .system)
button.contentHorizontalAlignment = .center

let attrs = NSAttributedString(string: "Terms of Service",
let attrs = NSAttributedString(string: String.adamant.Onboard.eulaTitle,
attributes:
[NSAttributedString.Key.foregroundColor: UIColor.adamant.textColor,
NSAttributedString.Key.font: UIFont(name: "Exo2-Regular", size: 18) ?? UIFont.adamantPrimary(ofSize: 18),
Expand All @@ -57,3 +57,10 @@ final class OnboardOverlay: SwiftyOnboardOverlay {
}

}

private extension String.adamant {
enum Onboard {
static let agreeLabel = String.localized("WelcomeScene.Description.Accept", comment: "Welcome: Description accept")
static let eulaTitle = String.localized("EULA.Title", comment: "")
}
}
17 changes: 17 additions & 0 deletions Adamant/zh.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* Bundle display name */
"CFBundleDisplayName" = "ADAMANT";

/* Bundle name */
"CFBundleName" = "ADAMANT信使";

/* Privacy - Camera Usage Description */
"NSCameraUsageDescription" = "需要摄像头扫描二维码以查找地址和密码短语";

/* Privacy - Face ID Usage Description */
"NSFaceIDUsageDescription" = "使用Face ID登录您的ADAMANT帐户";

/* Privacy - Photo Library Additions Usage Description */
"NSPhotoLibraryAddUsageDescription" = "保存带有密码短语和地址的二维码";

/* Privacy - Photo Library Usage Description */
"NSPhotoLibraryUsageDescription" = "读取带有密码短语和地址的二维码";
Original file line number Diff line number Diff line change
Expand Up @@ -1138,6 +1138,9 @@
/* Welcome: Skip button */
"WelcomeScene.Description.SkipButton" = "Überspringen";

/* Welcome: Description accept */
"WelcomeScene.Description.Accept" = "Ik accepteer";

/* EULA */
"EULA.Title" = "Geschäftsbedingungen";
"EULA.Accept" = "Akzeptieren";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1117,6 +1117,9 @@
/* Welcome: Skip button */
"WelcomeScene.Description.SkipButton" = "Skip";

/* Welcome: Description accept */
"WelcomeScene.Description.Accept" = "I accept";

/* EULA */
"EULA.Title" = "Terms of Service";
"EULA.Accept" = "Accept";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1114,6 +1114,9 @@
/* Welcome: Skip button" */
"WelcomeScene.Description.SkipButton" = "Пропустить";

/* Welcome: Description accept */
"WelcomeScene.Description.Accept" = "Я принимаю";

/* EULA */
"EULA.Title" = "Условия использования";
"EULA.Accept" = "Принять";
Expand Down
Loading

0 comments on commit d2fa7ef

Please sign in to comment.