Skip to content

Commit 64f36e9

Browse files
Finalizing Translations
1 parent a92f820 commit 64f36e9

File tree

9 files changed

+775
-630
lines changed

9 files changed

+775
-630
lines changed

WinDiskWriter/LocalizedStrings/LocalizedStrings.h

Lines changed: 319 additions & 289 deletions
Large diffs are not rendered by default.

WinDiskWriter/LocalizedStrings/LocalizedStrings.m

Lines changed: 344 additions & 304 deletions
Large diffs are not rendered by default.

WinDiskWriter/LocalizedStrings/en.lproj/Localizable.strings

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,30 @@
8484
"ALERT_TITLE_WRITE_FILE_PROBLEM_OCCURRED" = "A problem occurred while writing the file to disk";
8585

8686

87+
"AS_LOG_TYPE_ASSERTION_ERROR" = "AssertionFailure";
88+
89+
90+
"AS_LOG_TYPE_FAILURE" = "Failure";
91+
92+
93+
"AS_LOG_TYPE_FATAL" = "Fatal";
94+
95+
96+
"AS_LOG_TYPE_LOG" = "Log";
97+
98+
99+
"AS_LOG_TYPE_SKIPPED" = "Skipped";
100+
101+
102+
"AS_LOG_TYPE_START" = "Start";
103+
104+
105+
"AS_LOG_TYPE_SUCCESS" = "Success";
106+
107+
108+
"AS_LOG_TYPE_WARNING" = "Warning";
109+
110+
87111
"AUTHORIZATION_ERROR_BAD_ADDRESS" = "The requested socket address is invalid (must be 0-1023 inclusive).";
88112

89113

@@ -360,6 +384,12 @@
360384
"LOGVIEW_ROW_CREATE_DIRECTORY_AT_APP_FOLDER_PATH" = "Create directory at Application Folder path: '%@'.";
361385

362386

387+
"LOGVIEW_ROW_FOUND_LEGACY_BOOTLOADER_FILES" = "Found Legacy Bootloader files.";
388+
389+
390+
"LOGVIEW_ROW_LEGACY_BOOTLOADER_FILES_NOT_FOUND" = "Legacy Bootloader files were not found.";
391+
392+
363393
"LOGVIEW_ROW_PARTIAL_TITLE_ERROR_MESSAGE" = "(Error message: '%@')";
364394

365395

WinDiskWriter/LocalizedStrings/ru.lproj/Localizable.strings

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,30 @@
8484
"ALERT_TITLE_WRITE_FILE_PROBLEM_OCCURRED" = "Произошла проблема во время записи файла на диск";
8585

8686

87+
"AS_LOG_TYPE_ASSERTION_ERROR" = "Нарушение условия";
88+
89+
90+
"AS_LOG_TYPE_FAILURE" = "Ошибка";
91+
92+
93+
"AS_LOG_TYPE_FATAL" = "Фатальная ошибка";
94+
95+
96+
"AS_LOG_TYPE_LOG" = "Инфо";
97+
98+
99+
"AS_LOG_TYPE_SKIPPED" = "Пропущено";
100+
101+
102+
"AS_LOG_TYPE_START" = "Старт";
103+
104+
105+
"AS_LOG_TYPE_SUCCESS" = "Успешно";
106+
107+
108+
"AS_LOG_TYPE_WARNING" = "Предупреждение";
109+
110+
87111
"AUTHORIZATION_ERROR_BAD_ADDRESS" = "Запрошенный адрес сокета не является валидным (должен быть в диапазоне 0-1023 включительно).";
88112

89113

@@ -360,6 +384,12 @@
360384
"LOGVIEW_ROW_CREATE_DIRECTORY_AT_APP_FOLDER_PATH" = "Создание директории в директории приложения: '%@'.";
361385

362386

387+
"LOGVIEW_ROW_FOUND_LEGACY_BOOTLOADER_FILES" = "Найдены файлы загрузчика Legacy BIOS.";
388+
389+
390+
"LOGVIEW_ROW_LEGACY_BOOTLOADER_FILES_NOT_FOUND" = "Файла загрузчика Legacy BIOS не были найдены.";
391+
392+
363393
"LOGVIEW_ROW_PARTIAL_TITLE_ERROR_MESSAGE" = "(Сообщение об ошибке: '%@')";
364394

365395

WinDiskWriter/Views/AdvancedTextView/AdvancedTextView.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
NS_ASSUME_NONNULL_BEGIN
1313

14-
typedef NSString *ASLogType NS_TYPED_ENUM;
15-
1614
@interface AdvancedTextView : NSScrollView
1715

1816
@property (nonatomic, strong, readonly) VibrantTextView *textViewInstance;
@@ -23,8 +21,6 @@ typedef NSString *ASLogType NS_TYPED_ENUM;
2321

2422
- (void)appendTimestampedLine: (NSString *)message;
2523

26-
- (void)appendTimestampedLine: (NSString *)message
27-
logType: (ASLogType)logType;
2824
- (void)clear;
2925

3026
@end

WinDiskWriter/Views/AdvancedTextView/AdvancedTextView.m

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,6 @@ - (BOOL)allowsVibrancy {
7171
return YES;
7272
}
7373

74-
- (void)appendTimestampedLine: (NSString *)message
75-
logType: (ASLogType)logType {
76-
NSString *timeString = [dateFormatter stringFromDate: NSDate.date];
77-
NSString *timestampedString = [NSString stringWithFormat:@"[(%@) %@] %@", logType, timeString, message];
78-
79-
[self appendLine: timestampedString];
80-
}
81-
8274
- (void)appendTimestampedLine: (NSString *)message {
8375
NSString *timeString = [dateFormatter stringFromDate: NSDate.date];
8476

WinDiskWriter/Views/LogView/LogView.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@
1010

1111
NS_ASSUME_NONNULL_BEGIN
1212

13-
typedef NSString *ASLogType NS_TYPED_ENUM;
14-
15-
extern ASLogType const ASLogTypeStart;
16-
extern ASLogType const ASLogTypeSuccess;
17-
extern ASLogType const ASLogTypeFailure;
18-
extern ASLogType const ASLogTypeSkipped;
19-
20-
extern ASLogType const ASLogTypeLog;
21-
extern ASLogType const ASLogTypeWarning;
22-
extern ASLogType const ASLogTypeFatal;
23-
extern ASLogType const ASLogTypeAssertionError;
13+
typedef NS_ENUM(NSUInteger, ASLogType) {
14+
ASLogTypeStart,
15+
ASLogTypeSuccess,
16+
ASLogTypeFailure,
17+
ASLogTypeSkipped,
18+
19+
ASLogTypeLog,
20+
ASLogTypeWarning,
21+
ASLogTypeFatal,
22+
ASLogTypeAssertionError
23+
};
2424

2525
@interface LogView : NSScrollView
2626

WinDiskWriter/Views/LogView/LogView.m

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,51 @@
1010
#import "NSColor+Common.h"
1111
#import "VibrantTableView.h"
1212
#import "NSMutableAttributedString+Common.h"
13+
#import "LocalizedStrings.h"
1314
#import "ContaineredTableView.h"
1415
#import "MiddleAlignedCell.h"
1516

16-
ASLogType const ASLogTypeStart = @"Start";
17-
ASLogType const ASLogTypeSuccess = @"Success";
18-
ASLogType const ASLogTypeFailure = @"Failure";
19-
ASLogType const ASLogTypeSkipped = @"Skipped";
20-
21-
ASLogType const ASLogTypeLog = @"Log";
22-
ASLogType const ASLogTypeWarning = @"Warning";
23-
ASLogType const ASLogTypeFatal = @"Fatal";
24-
ASLogType const ASLogTypeAssertionError = @"AssertionFailure";
25-
17+
/*
18+
ASLogType ASLogTypeStart = @"Start";
19+
ASLogType ASLogTypeSuccess = @"Success";
20+
ASLogType ASLogTypeFailure = @"Failure";
21+
ASLogType ASLogTypeSkipped = @"Skipped";
22+
23+
ASLogType ASLogTypeLog = @"Log";
24+
ASLogType ASLogTypeWarning = @"Warning";
25+
ASLogType ASLogTypeFatal = @"Fatal";
26+
ASLogType ASLogTypeAssertionError = @"AssertionFailure";
27+
*/
28+
2629
@implementation LogView {
2730
NSDateFormatter *dateFormatter;
2831
NSTextField *dummyTextField;
2932
}
3033

34+
+ (NSString *)logTypeStringForKey: (ASLogType)logType {
35+
switch (logType) {
36+
case ASLogTypeStart:
37+
return [LocalizedStrings asLogTypeStart];
38+
case ASLogTypeSuccess:
39+
return [LocalizedStrings asLogTypeSuccess];
40+
case ASLogTypeFailure:
41+
return [LocalizedStrings asLogTypeFailure];
42+
case ASLogTypeSkipped:
43+
return [LocalizedStrings asLogTypeSkipped];
44+
case ASLogTypeLog:
45+
return [LocalizedStrings asLogTypeLog];
46+
case ASLogTypeWarning:
47+
return [LocalizedStrings asLogTypeWarning];
48+
case ASLogTypeFatal:
49+
return [LocalizedStrings asLogTypeFatal];
50+
case ASLogTypeAssertionError:
51+
return [LocalizedStrings asLogTypeAssertionError];
52+
}
53+
54+
// Fallback value
55+
return [LocalizedStrings asLogTypeLog];
56+
}
57+
3158
- (instancetype)init {
3259
self = [super init];
3360

@@ -106,14 +133,14 @@ - (void)appendRow:(NSString *)string {
106133

107134
- (void)appendTimestampedRow: (NSString *)string
108135
logType: (ASLogType)logType {
109-
NSString *timestampedString = [NSString stringWithFormat: @"[(%@) %@] %@", logType, [self timeString], string];
136+
NSString *timestampedString = [NSString stringWithFormat: @"[(%@) %@] %@", [LogView logTypeStringForKey: logType], [self timeString], string];
110137

111138
[self appendRow: timestampedString];
112139
}
113140

114141
- (void)appendRow: (NSString *)string
115142
logType: (ASLogType)logType {
116-
NSString *logTypedString = [NSString stringWithFormat: @"[%@] %@", logType, string];
143+
NSString *logTypedString = [NSString stringWithFormat: @"[%@] %@", [LogView logTypeStringForKey: logType], string];
117144

118145
[self appendRow:logTypedString];
119146
}

WinDiskWriter/Windows/MainWindow/MainWindow.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -866,9 +866,9 @@ - (void)writeAction {
866866
if (installLegacyBoot) {
867867
BOOL bootloaderLegacyFilesDownloaded = [self downloadLegacyBootloaderFiles];
868868
if (bootloaderLegacyFilesDownloaded) {
869-
[self->logsView appendRow:@"Found Legacy Bootloader files." logType:ASLogTypeSuccess];
869+
[self->logsView appendRow:[LocalizedStrings logviewRowFoundLegacyBootloaderFiles] logType:ASLogTypeSuccess];
870870
} else {
871-
[self->logsView appendRow:@"Legacy Bootloader files were not found." logType:ASLogTypeFatal];
871+
[self->logsView appendRow:[LocalizedStrings logviewRowLegacyBootloaderFilesNotFound] logType:ASLogTypeFatal];
872872

873873
WriteExitForce();
874874
}

0 commit comments

Comments
 (0)