Skip to content

Commit a89efe4

Browse files
Merge pull request #62 from dchprojects/add_ukrainian_and_russian_trasnlate
Add Ukrainian and Russian translate
2 parents 34bf2db + dc1a047 commit a89efe4

File tree

20 files changed

+288
-99
lines changed

20 files changed

+288
-99
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ source "https://rubygems.org"
22

33
gem 'cocoapods', '~> 1.11.2'
44
gem 'xcpretty', '~> 0.3.0'
5-
gem "fastlane", '~> 2.195.0'
5+
gem "fastlane", '~> 2.197.0'

Gemfile.lock

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ GEM
1717
artifactory (3.0.15)
1818
atomos (0.1.3)
1919
aws-eventstream (1.2.0)
20-
aws-partitions (1.508.0)
21-
aws-sdk-core (3.121.1)
20+
aws-partitions (1.518.0)
21+
aws-sdk-core (3.121.3)
2222
aws-eventstream (~> 1, >= 1.0.2)
2323
aws-partitions (~> 1, >= 1.239.0)
2424
aws-sigv4 (~> 1.1)
2525
jmespath (~> 1.0)
26-
aws-sdk-kms (1.48.0)
27-
aws-sdk-core (~> 3, >= 3.120.0)
26+
aws-sdk-kms (1.50.0)
27+
aws-sdk-core (~> 3, >= 3.121.2)
2828
aws-sigv4 (~> 1.1)
29-
aws-sdk-s3 (1.103.0)
30-
aws-sdk-core (~> 3, >= 3.120.0)
29+
aws-sdk-s3 (1.104.0)
30+
aws-sdk-core (~> 3, >= 3.121.2)
3131
aws-sdk-kms (~> 1)
3232
aws-sigv4 (~> 1.4)
3333
aws-sigv4 (1.4.0)
@@ -86,7 +86,7 @@ GEM
8686
escape (0.0.4)
8787
ethon (0.14.0)
8888
ffi (>= 1.15.0)
89-
excon (0.85.0)
89+
excon (0.87.0)
9090
faraday (1.8.0)
9191
faraday-em_http (~> 1.0)
9292
faraday-em_synchrony (~> 1.0)
@@ -109,10 +109,10 @@ GEM
109109
faraday-net_http_persistent (1.2.0)
110110
faraday-patron (1.0.0)
111111
faraday-rack (1.0.0)
112-
faraday_middleware (1.1.0)
112+
faraday_middleware (1.2.0)
113113
faraday (~> 1.0)
114114
fastimage (2.2.5)
115-
fastlane (2.195.0)
115+
fastlane (2.197.0)
116116
CFPropertyList (>= 2.3, < 4.0.0)
117117
addressable (>= 2.8, < 3.0.0)
118118
artifactory (~> 3.0)
@@ -155,7 +155,7 @@ GEM
155155
fourflusher (2.3.1)
156156
fuzzy_match (2.0.4)
157157
gh_inspector (1.1.3)
158-
google-apis-androidpublisher_v3 (0.11.0)
158+
google-apis-androidpublisher_v3 (0.12.0)
159159
google-apis-core (>= 0.4, < 2.a)
160160
google-apis-core (0.4.1)
161161
addressable (~> 2.5, >= 2.5.1)
@@ -201,10 +201,10 @@ GEM
201201
concurrent-ruby (~> 1.0)
202202
jmespath (1.4.0)
203203
json (2.5.1)
204-
jwt (2.2.3)
204+
jwt (2.3.0)
205205
memoist (0.16.2)
206206
mini_magick (4.11.0)
207-
mini_mime (1.1.1)
207+
mini_mime (1.1.2)
208208
minitest (5.14.4)
209209
molinillo (0.8.0)
210210
multi_json (1.15.0)
@@ -274,7 +274,7 @@ PLATFORMS
274274

275275
DEPENDENCIES
276276
cocoapods (~> 1.11.2)
277-
fastlane (~> 2.195.0)
277+
fastlane (~> 2.197.0)
278278
xcpretty (~> 0.3.0)
279279

280280
BUNDLED WITH

MyDictionary_App_Swift.xcodeproj/project.pbxproj

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
2223F8AE26512DEB004F2FE9 /* MDConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2223F8AD26512DEB004F2FE9 /* MDConstants.swift */; };
5353
2223F8B426512F01004F2FE9 /* MDLocalizedText.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2223F8B326512F01004F2FE9 /* MDLocalizedText.swift */; };
5454
2223F8B726512F5B004F2FE9 /* AppLanguageType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2223F8B626512F5B004F2FE9 /* AppLanguageType.swift */; };
55-
2223F8BB26512F8C004F2FE9 /* AppLanguageService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2223F8BA26512F8C004F2FE9 /* AppLanguageService.swift */; };
55+
2223F8BB26512F8C004F2FE9 /* MDAppLanguageService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2223F8BA26512F8C004F2FE9 /* MDAppLanguageService.swift */; };
5656
2223F8BC26512FFD004F2FE9 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 2223F8BE26512FFD004F2FE9 /* Localizable.strings */; };
5757
222F52702701AD080070F546 /* MDTextViewWithToolBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 222F526F2701AD080070F546 /* MDTextViewWithToolBar.swift */; };
5858
222F52772701E3900070F546 /* MDTextFieldDelegatePropertyProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 222F52762701E3900070F546 /* MDTextFieldDelegatePropertyProtocol.swift */; };
@@ -408,7 +408,7 @@
408408
2223F8AD26512DEB004F2FE9 /* MDConstants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDConstants.swift; sourceTree = "<group>"; };
409409
2223F8B326512F01004F2FE9 /* MDLocalizedText.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDLocalizedText.swift; sourceTree = "<group>"; };
410410
2223F8B626512F5B004F2FE9 /* AppLanguageType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppLanguageType.swift; sourceTree = "<group>"; };
411-
2223F8BA26512F8C004F2FE9 /* AppLanguageService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppLanguageService.swift; sourceTree = "<group>"; };
411+
2223F8BA26512F8C004F2FE9 /* MDAppLanguageService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDAppLanguageService.swift; sourceTree = "<group>"; };
412412
2223F8BD26512FFD004F2FE9 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
413413
222F526F2701AD080070F546 /* MDTextViewWithToolBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDTextViewWithToolBar.swift; sourceTree = "<group>"; };
414414
222F52762701E3900070F546 /* MDTextFieldDelegatePropertyProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDTextFieldDelegatePropertyProtocol.swift; sourceTree = "<group>"; };
@@ -509,6 +509,8 @@
509509
228C596B27033D0800DE6175 /* EditWordInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditWordInteractor.swift; sourceTree = "<group>"; };
510510
228C596C27033D0800DE6175 /* EditWordDataProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditWordDataProvider.swift; sourceTree = "<group>"; };
511511
228C596D27033D0800DE6175 /* EditWordDataManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditWordDataManager.swift; sourceTree = "<group>"; };
512+
228F111D2721644400D739D5 /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/Localizable.strings; sourceTree = "<group>"; };
513+
228F111E2721645B00D739D5 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = "<group>"; };
512514
2291BAEF26F714DD0012504D /* MDSearchBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDSearchBar.swift; sourceTree = "<group>"; };
513515
2291BAF226F7265E0012504D /* MDSearchTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDSearchTextField.swift; sourceTree = "<group>"; };
514516
2291BAF426F754CF0012504D /* UITableView+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITableView+Extension.swift"; sourceTree = "<group>"; };
@@ -1061,7 +1063,7 @@
10611063
2223F8B926512F87004F2FE9 /* AppLanguageService */ = {
10621064
isa = PBXGroup;
10631065
children = (
1064-
2223F8BA26512F8C004F2FE9 /* AppLanguageService.swift */,
1066+
2223F8BA26512F8C004F2FE9 /* MDAppLanguageService.swift */,
10651067
);
10661068
path = AppLanguageService;
10671069
sourceTree = "<group>";
@@ -2193,6 +2195,8 @@
21932195
knownRegions = (
21942196
en,
21952197
Base,
2198+
uk,
2199+
ru,
21962200
);
21972201
mainGroup = 228BC42B264979FD0030FB30;
21982202
productRefGroup = 228BC435264979FD0030FB30 /* Products */;
@@ -2415,7 +2419,7 @@
24152419
220793DA26C6BF58003D434B /* AuthResponse.swift in Sources */,
24162420
22493C3726972232000DA480 /* MDWordCoreDataStorage.swift in Sources */,
24172421
2223F8B726512F5B004F2FE9 /* AppLanguageType.swift in Sources */,
2418-
2223F8BB26512F8C004F2FE9 /* AppLanguageService.swift in Sources */,
2422+
2223F8BB26512F8C004F2FE9 /* MDAppLanguageService.swift in Sources */,
24192423
22CD45F226F090F20060978D /* MDCounterTextFieldWithToolBar.swift in Sources */,
24202424
22BD99A0266A4AB10063FEFC /* WordListModule.swift in Sources */,
24212425
22EF01EC269DA70300FE4435 /* Endpoint.swift in Sources */,
@@ -2676,6 +2680,8 @@
26762680
isa = PBXVariantGroup;
26772681
children = (
26782682
2223F8BD26512FFD004F2FE9 /* en */,
2683+
228F111D2721644400D739D5 /* uk */,
2684+
228F111E2721645B00D739D5 /* ru */,
26792685
);
26802686
name = Localizable.strings;
26812687
sourceTree = "<group>";
@@ -2695,6 +2701,7 @@
26952701
isa = XCBuildConfiguration;
26962702
buildSettings = {
26972703
ALWAYS_SEARCH_USER_PATHS = NO;
2704+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
26982705
CLANG_ANALYZER_NONNULL = YES;
26992706
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
27002707
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
@@ -2756,6 +2763,7 @@
27562763
isa = XCBuildConfiguration;
27572764
buildSettings = {
27582765
ALWAYS_SEARCH_USER_PATHS = NO;
2766+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
27592767
CLANG_ANALYZER_NONNULL = YES;
27602768
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
27612769
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
@@ -2816,7 +2824,7 @@
28162824
CODE_SIGN_IDENTITY = "iPhone Distribution";
28172825
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = YES;
28182826
CODE_SIGN_STYLE = Manual;
2819-
CURRENT_PROJECT_VERSION = 3;
2827+
CURRENT_PROJECT_VERSION = 1;
28202828
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
28212829
DEVELOPMENT_TEAM = CXRA2S6SCR;
28222830
INFOPLIST_FILE = MyDictionary_App_Swift/Resources/InfoPlist/Info.plist;
@@ -2825,7 +2833,7 @@
28252833
"$(inherited)",
28262834
"@executable_path/Frameworks",
28272835
);
2828-
MARKETING_VERSION = 1.0.1;
2836+
MARKETING_VERSION = 1.1.0;
28292837
PRODUCT_BUNDLE_IDENTIFIER = "com.dcteam.MyDictionary-App-Swift";
28302838
PRODUCT_NAME = "$(TARGET_NAME)";
28312839
PROVISIONING_PROFILE_SPECIFIER = "com.dcteam.MyDictionary-App-Swift AppStore";
@@ -2844,15 +2852,15 @@
28442852
CODE_SIGN_IDENTITY = "iPhone Distribution";
28452853
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = YES;
28462854
CODE_SIGN_STYLE = Manual;
2847-
CURRENT_PROJECT_VERSION = 3;
2855+
CURRENT_PROJECT_VERSION = 1;
28482856
DEVELOPMENT_TEAM = CXRA2S6SCR;
28492857
INFOPLIST_FILE = MyDictionary_App_Swift/Resources/InfoPlist/Info.plist;
28502858
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
28512859
LD_RUNPATH_SEARCH_PATHS = (
28522860
"$(inherited)",
28532861
"@executable_path/Frameworks",
28542862
);
2855-
MARKETING_VERSION = 1.0.1;
2863+
MARKETING_VERSION = 1.1.0;
28562864
PRODUCT_BUNDLE_IDENTIFIER = "com.dcteam.MyDictionary-App-Swift";
28572865
PRODUCT_NAME = "$(TARGET_NAME)";
28582866
PROVISIONING_PROFILE_SPECIFIER = "com.dcteam.MyDictionary-App-Swift AppStore";

MyDictionary_App_Swift/Common/KeysForTranslate/MDLocalizedText.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ enum MDLocalizedText: String {
5151
case update
5252
case wordTextIsEmpty = "word_text_is_empty"
5353
case wordDescriptionIsEmpty = "word_description_is_empty"
54+
case appLanguage = "app_language"
5455

5556
// Api Errors //
5657
case noDataApiError = "no_data_api_error"

MyDictionary_App_Swift/Common/Protocols/MDLocalizableProtocol.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ protocol MDLocalizableProtocol {
1313
}
1414

1515
extension MDLocalizableProtocol where Self: RawRepresentable, Self.RawValue == String {
16-
16+
1717
func localized(lang: AppLanguageType, tableName: String) -> String {
1818
return rawValue.localized(lang: lang.rawValue, tableName: tableName)
1919
}
2020

21-
/// - Parameter lang: MYAppLanguageService.shared.appLanguage.rawValue
22-
/// - Parameter tableName: Constants.StaticText.defaultTableName
21+
/// - Parameter lang: MDConstants.AppDependencies.dependencies.appLanguageService.appLanguage.rawValue
22+
/// - Parameter tableName: MDConstants.StaticText.defaultTableName
2323
var localized: String {
24-
return rawValue.localized(lang: MYAppLanguageService.shared.appLanguage.rawValue,
24+
return rawValue.localized(lang: MDConstants.AppDependencies.dependencies.appLanguageService.appLanguage.rawValue,
2525
tableName: MDConstants.StaticText.defaultTableName)
2626
}
2727

MyDictionary_App_Swift/MDAppDependencies.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ protocol MDAppDependenciesProtocol {
4141
var fillMemoryService: MDFillMemoryServiceProtocol! { get }
4242

4343
var bridge: MDBridgeProtocol! { get }
44+
45+
var appLanguageService: MDAppLanguageServiceProtocol! { get }
46+
4447
}
4548

4649
final class MDAppDependencies: NSObject,
@@ -78,6 +81,8 @@ final class MDAppDependencies: NSObject,
7881

7982
var bridge: MDBridgeProtocol!
8083

84+
var appLanguageService: MDAppLanguageServiceProtocol!
85+
8186
override init() {
8287
super.init()
8388
configureDependencies()
@@ -275,6 +280,15 @@ extension MDAppDependencies {
275280
//
276281
//
277282

283+
//
284+
// App Language Service
285+
let appLanguageService: MDAppLanguageServiceProtocol = MDAppLanguageService.init(locale: .current,
286+
defaultAppLanguage: .en)
287+
//
288+
self.appLanguageService = appLanguageService
289+
//
290+
//
291+
278292
// Configure FirebaseApp
279293
FirebaseApp.configure()
280294

MyDictionary_App_Swift/Modules/SettingsModule/Enums/SettingsRowType.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import Foundation
1010
enum SettingsRowType: Int {
1111
case about
1212
case account
13+
case appLanguage
1314
case privacyPolicy
1415
case termsOfService
1516
case shareFeedback
@@ -23,6 +24,8 @@ extension SettingsRowType: CustomStringConvertible {
2324
return MDLocalizedText.about.localized
2425
case .account:
2526
return MDLocalizedText.account.localized
27+
case .appLanguage:
28+
return MDLocalizedText.appLanguage.localized
2629
case .privacyPolicy:
2730
return MDLocalizedText.privacyPolicy.localized
2831
case .termsOfService:

MyDictionary_App_Swift/Modules/SettingsModule/SettingsInteractor.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ protocol SettingsInteractorOutputProtocol: AnyObject,
1818

1919
func showAbout()
2020
func showAccount()
21+
func showAppSettings()
2122
func showPrivacyPolicy()
2223
func showTermsOfService()
2324
func showShareFeedbackActionsSheet()
@@ -107,6 +108,10 @@ fileprivate extension SettingsInteractor {
107108
self?.interactorOutput?.showAccount()
108109
break
109110

111+
case .appLanguage:
112+
self?.interactorOutput?.showAppSettings()
113+
break
114+
110115
case .privacyPolicy:
111116
self?.interactorOutput?.showPrivacyPolicy()
112117
break

MyDictionary_App_Swift/Modules/SettingsModule/SettingsModule.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ extension SettingsModule {
2323
let settingsRows: [SettingsRowModel] = [.init(rowType: .account),
2424
.init(rowType: .privacyPolicy),
2525
.init(rowType: .termsOfService),
26+
.init(rowType: .appLanguage),
2627
.init(rowType: .about),
2728
.init(rowType: .shareFeedback)]
2829

MyDictionary_App_Swift/Modules/SettingsModule/SettingsPresenter.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ extension SettingsPresenter {
6969
router.showAccount()
7070
}
7171

72+
func showAppSettings() {
73+
router.showAppSettings()
74+
}
75+
7276
func showPrivacyPolicy() {
7377
router.showPrivacyPolicy()
7478
}

0 commit comments

Comments
 (0)