Skip to content

Commit d8ccf68

Browse files
author
Artsem Lemiasheuski
committed
Changed strings keys to conform android version of them.
1 parent a32b9cf commit d8ccf68

19 files changed

Lines changed: 207 additions & 356 deletions

OpenDocumentReader/DocumentBrowserViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class DocumentBrowserViewController: UIDocumentBrowserViewController, UIDocument
4747
func documentBrowser(_ controller: UIDocumentBrowserViewController, failedToImportDocumentAt documentURL: URL, error: Error?) {
4848
let alert = UIAlertController(
4949
title: "",
50-
message: NSLocalizedString("alert_error_generic", comment: ""),
50+
message: NSLocalizedString("toast_error_generic", comment: ""),
5151
preferredStyle: .alert)
5252

5353
let action = UIAlertAction(

OpenDocumentReader/DocumentViewController.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ class DocumentViewController: UIViewController, DocumentDelegate, GADBannerViewD
199199
}
200200

201201
if document?.edit ?? false {
202-
alert.addAction(UIAlertAction(title: NSLocalizedString("menu_save", comment: ""), style: .default, handler: { (_) in
202+
alert.addAction(UIAlertAction(title: NSLocalizedString("action_edit_save", comment: ""), style: .default, handler: { (_) in
203203
self.saveContent(completion: nil)
204204
}))
205205

@@ -214,7 +214,7 @@ class DocumentViewController: UIViewController, DocumentDelegate, GADBannerViewD
214214
alert.addAction(UIAlertAction(title: NSLocalizedString("menu_cloud_print", comment: ""), style: .default, handler: { (_) in
215215
self.printDocument()
216216
}))
217-
alert.addAction(UIAlertAction(title: NSLocalizedString("menu_help", comment: ""), style: .default, handler: { (_) in
217+
alert.addAction(UIAlertAction(title: NSLocalizedString("action_edit_help", comment: ""), style: .default, handler: { (_) in
218218
self.showWebsite()
219219
}))
220220
alert.addAction(UIAlertAction(title: NSLocalizedString("cancel", comment: ""), style: .cancel, handler: nil))
@@ -248,10 +248,10 @@ class DocumentViewController: UIViewController, DocumentDelegate, GADBannerViewD
248248
let message: String
249249
let color: UIColor
250250
if success {
251-
message = NSLocalizedString("alert_document_saved", comment: "")
251+
message = NSLocalizedString("toast_edit_status_saved", comment: "")
252252
color = .green
253253
} else {
254-
message = NSLocalizedString("alert_error_save_failed", comment: "")
254+
message = NSLocalizedString("toast_error_save_failed", comment: "")
255255
color = .red
256256
}
257257

@@ -323,7 +323,7 @@ class DocumentViewController: UIViewController, DocumentDelegate, GADBannerViewD
323323
})
324324
}
325325

326-
let alert = UIAlertController(title: NSLocalizedString("alert_error_password_protected", comment: ""), message: NSLocalizedString("alert_enter_password", comment: ""), preferredStyle: .alert)
326+
let alert = UIAlertController(title: NSLocalizedString("toast_error_password_protected", comment: ""), message: "", preferredStyle: .alert)
327327
alert.addTextField { (textField) in
328328
textField.text = ""
329329
}
@@ -361,7 +361,7 @@ class DocumentViewController: UIViewController, DocumentDelegate, GADBannerViewD
361361
return;
362362
}
363363

364-
self.webview.loadHTMLString("<html><h1>\(NSLocalizedString("error", comment: ""))</h1>\(NSLocalizedString("failed_to_load_document", comment: ""))</html>", baseURL: nil)
364+
self.webview.loadHTMLString("<html><h1>\(NSLocalizedString("error", comment: ""))</h1>\(NSLocalizedString("toast_error_generic", comment: ""))</html>", baseURL: nil)
365365

366366
Analytics.logEvent(
367367
"load_error",

OpenDocumentReader/PageViewController.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ class PageViewController: UIPageViewController {
1212

1313
let contentViewController = "contentViewController"
1414

15-
var headersArray = [NSLocalizedString("intro_title_1", comment: ""),
16-
NSLocalizedString("intro_title_2", comment: ""),
17-
NSLocalizedString("intro_title_3", comment: ""),]
18-
var subHeadersArray = [NSLocalizedString("intro_description_1", comment: ""),
19-
NSLocalizedString("intro_description_2", comment: ""),
20-
NSLocalizedString("intro_description_3", comment: ""),]
15+
var headersArray = [NSLocalizedString("intro_title_open", comment: ""),
16+
NSLocalizedString("intro_title_edit", comment: ""),
17+
NSLocalizedString("intro_title_apps", comment: ""),]
18+
var subHeadersArray = [NSLocalizedString("intro_description_open", comment: ""),
19+
NSLocalizedString("intro_description_edit", comment: ""),
20+
NSLocalizedString("intro_description_apps", comment: ""),]
2121
var imagesArray = [Constants.onboarding_image_1,
2222
Constants.onboarding_image_2,
2323
Constants.onboarding_image_3]
Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
/* */
2-
"alert_error_generic" = "Hi ha hagut un problema. No s'ha pogut obrir el fitxer.";
2+
"toast_error_generic" = "Hi ha hagut un problema. No s'ha pogut obrir el fitxer.";
33

44
/* */
55
"ok" = "OK";
66

7-
/* */
8-
"no_description" = "No Description";
9-
107
/* */
118
"alert_unsaved_changes" = "You have unsaved changes";
129

@@ -23,7 +20,7 @@
2320
"menu_edit" = "Edit document";
2421

2522
/* */
26-
"menu_save" = "Save";
23+
"action_edit_save" = "Save";
2724

2825
/* */
2926
"menu_discard_changes" = "Discard changes";
@@ -35,40 +32,37 @@
3532
"menu_cloud_print" = "Google Cloud Print";
3633

3734
/* */
38-
"menu_help" = "Help!?";
35+
"action_edit_help" = "Help!?";
3936

4037
/* */
4138
"cancel" = "Cancel";
4239

4340
/* */
44-
"alert_document_saved" = "Document saved";
45-
46-
/* */
47-
"alert_error_save_failed" = "File could not be saved. Please contact support@opendocument.app";
41+
"toast_edit_status_saved" = "Document saved";
4842

4943
/* */
50-
"alert_error_password_protected" = "El document està protegit per contrasenya";
44+
"toast_error_save_failed" = "File could not be saved. Please contact support@opendocument.app";
5145

5246
/* */
53-
"alert_enter_password" = "Please enter the password to decrypt this document";
47+
"toast_error_password_protected" = "El document està protegit per contrasenya";
5448

5549
/* */
56-
"intro_title_1" = "Open and read your ODF file on the go!";
50+
"intro_title_open" = "Open and read your ODF file on the go!";
5751

5852
/* */
59-
"intro_title_2" = "Found a typo in your document? Now supports modification!";
53+
"intro_title_edit" = "Found a typo in your document? Now supports modification!";
6054

6155
/* */
62-
"intro_title_3" = "Read your documents from within other apps";
56+
"intro_title_apps" = "Read your documents from within other apps";
6357

6458
/* */
65-
"intro_description_1" = "OpenDocument Reader allows you to view documents that are stored in OpenDocument format (.odt, .ods, .odp and .odg). These files are usually created using LibreOffice or OpenOffice. This app allows to open such files on your mobile device too, so you can read them on the go.";
59+
"intro_description_open" = "OpenDocument Reader allows you to view documents that are stored in OpenDocument format (.odt, .ods, .odp and .odg). These files are usually created using LibreOffice or OpenOffice. This app allows to open such files on your mobile device too, so you can read them on the go.";
6660

6761
/* */
68-
"intro_description_2" = "OpenDocument Reader not only allows to read documents on your mobile device, but also supports modifying them too. Typos are fixed in a breeze, even on the train!";
62+
"intro_description_edit" = "OpenDocument Reader not only allows to read documents on your mobile device, but also supports modifying them too. Typos are fixed in a breeze, even on the train!";
6963

7064
/* */
71-
"intro_description_3" = "OpenDocument Reader supports a huge range of other apps to open documents from. A colleague sent a presentation via Gmail? Click the attachment and this app is going to open right away!";
65+
"intro_description_apps" = "OpenDocument Reader supports a huge range of other apps to open documents from. A colleague sent a presentation via Gmail? Click the attachment and this app is going to open right away!";
7266

7367
/* */
7468
"back_to_documents" = "Back to documents";
@@ -79,7 +73,3 @@
7973
/* */
8074
"error" = "Error";
8175

82-
/* */
83-
"failed_to_load_document" = "Failed to load given document. Please try another one while we are working hard to support as many documents as possible. Feel free to contact us via support@opendocument.app for further questions.";
84-
85-
Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
/* */
2-
"alert_error_generic" = "Něco se pokazilo. Nelze otevřít soubor.";
2+
"toast_error_generic" = "Něco se pokazilo. Nelze otevřít soubor.";
33

44
/* */
55
"ok" = "OK";
66

7-
/* */
8-
"no_description" = "No Description";
9-
107
/* */
118
"alert_unsaved_changes" = "You have unsaved changes";
129

@@ -23,7 +20,7 @@
2320
"menu_edit" = "Upravit dokument";
2421

2522
/* */
26-
"menu_save" = "Uložit";
23+
"action_edit_save" = "Uložit";
2724

2825
/* */
2926
"menu_discard_changes" = "Discard changes";
@@ -35,40 +32,37 @@
3532
"menu_cloud_print" = "Google Cloud Print";
3633

3734
/* */
38-
"menu_help" = "Help!?";
35+
"action_edit_help" = "Help!?";
3936

4037
/* */
4138
"cancel" = "Cancel";
4239

4340
/* */
44-
"alert_document_saved" = "Document saved";
45-
46-
/* */
47-
"alert_error_save_failed" = "File could not be saved. Please contact support@opendocument.app";
41+
"toast_edit_status_saved" = "Document saved";
4842

4943
/* */
50-
"alert_error_password_protected" = "Dokument je chráněn heslem";
44+
"toast_error_save_failed" = "File could not be saved. Please contact support@opendocument.app";
5145

5246
/* */
53-
"alert_enter_password" = "Please enter the password to decrypt this document";
47+
"toast_error_password_protected" = "Dokument je chráněn heslem";
5448

5549
/* */
56-
"intro_title_1" = "Open and read your ODF file on the go!";
50+
"intro_title_open" = "Open and read your ODF file on the go!";
5751

5852
/* */
59-
"intro_title_2" = "Found a typo in your document? Now supports modification!";
53+
"intro_title_edit" = "Found a typo in your document? Now supports modification!";
6054

6155
/* */
62-
"intro_title_3" = "Read your documents from within other apps";
56+
"intro_title_apps" = "Read your documents from within other apps";
6357

6458
/* */
65-
"intro_description_1" = "OpenDocument Reader allows you to view documents that are stored in OpenDocument format (.odt, .ods, .odp and .odg). These files are usually created using LibreOffice or OpenOffice. This app allows to open such files on your mobile device too, so you can read them on the go.";
59+
"intro_description_open" = "OpenDocument Reader allows you to view documents that are stored in OpenDocument format (.odt, .ods, .odp and .odg). These files are usually created using LibreOffice or OpenOffice. This app allows to open such files on your mobile device too, so you can read them on the go.";
6660

6761
/* */
68-
"intro_description_2" = "OpenDocument Reader not only allows to read documents on your mobile device, but also supports modifying them too. Typos are fixed in a breeze, even on the train!";
62+
"intro_description_edit" = "OpenDocument Reader not only allows to read documents on your mobile device, but also supports modifying them too. Typos are fixed in a breeze, even on the train!";
6963

7064
/* */
71-
"intro_description_3" = "OpenDocument Reader supports a huge range of other apps to open documents from. A colleague sent a presentation via Gmail? Click the attachment and this app is going to open right away!";
65+
"intro_description_apps" = "OpenDocument Reader supports a huge range of other apps to open documents from. A colleague sent a presentation via Gmail? Click the attachment and this app is going to open right away!";
7266

7367
/* */
7468
"back_to_documents" = "Back to documents";
@@ -79,6 +73,3 @@
7973
/* */
8074
"error" = "Error";
8175

82-
/* */
83-
"failed_to_load_document" = "Failed to load given document. Please try another one while we are working hard to support as many documents as possible. Feel free to contact us via support@opendocument.app for further questions.";
84-
Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
/* */
2-
"alert_error_generic" = "Der er gået noget galt. Filen kunne ikke åbnes.";
2+
"toast_error_generic" = "Der er gået noget galt. Filen kunne ikke åbnes.";
33

44
/* */
55
"ok" = "OK";
66

7-
/* */
8-
"no_description" = "No Description";
9-
107
/* */
118
"alert_unsaved_changes" = "You have unsaved changes";
129

@@ -23,7 +20,7 @@
2320
"menu_edit" = "Edit document";
2421

2522
/* */
26-
"menu_save" = "Save";
23+
"action_edit_save" = "Save";
2724

2825
/* */
2926
"menu_discard_changes" = "Discard changes";
@@ -35,40 +32,37 @@
3532
"menu_cloud_print" = "Print document";
3633

3734
/* */
38-
"menu_help" = "Help!?";
35+
"action_edit_help" = "Help!?";
3936

4037
/* */
4138
"cancel" = "Cancel";
4239

4340
/* */
44-
"alert_document_saved" = "Document saved";
45-
46-
/* */
47-
"alert_error_save_failed" = "File could not be saved. Please contact support@opendocument.app";
41+
"toast_edit_status_saved" = "Document saved";
4842

4943
/* */
50-
"alert_error_password_protected" = "Dokumentet er låst med et kodeord";
44+
"toast_error_save_failed" = "File could not be saved. Please contact support@opendocument.app";
5145

5246
/* */
53-
"alert_enter_password" = "Please enter the password to decrypt this document";
47+
"toast_error_password_protected" = "Dokumentet er låst med et kodeord";
5448

5549
/* */
56-
"intro_title_1" = "Open and read your ODF file on the go!";
50+
"intro_title_open" = "Open and read your ODF file on the go!";
5751

5852
/* */
59-
"intro_title_2" = "Found a typo in your document? Now supports modification!";
53+
"intro_title_edit" = "Found a typo in your document? Now supports modification!";
6054

6155
/* */
62-
"intro_title_3" = "Read your documents from within other apps";
56+
"intro_title_apps" = "Read your documents from within other apps";
6357

6458
/* */
65-
"intro_description_1" = "OpenDocument Reader allows you to view documents that are stored in OpenDocument format (.odt, .ods, .odp and .odg). These files are usually created using LibreOffice or OpenOffice. This app allows to open such files on your mobile device too, so you can read them on the go.";
59+
"intro_description_open" = "OpenDocument Reader allows you to view documents that are stored in OpenDocument format (.odt, .ods, .odp and .odg). These files are usually created using LibreOffice or OpenOffice. This app allows to open such files on your mobile device too, so you can read them on the go.";
6660

6761
/* */
68-
"intro_description_2" = "OpenDocument Reader not only allows to read documents on your mobile device, but also supports modifying them too. Typos are fixed in a breeze, even on the train!";
62+
"intro_description_edit" = "OpenDocument Reader not only allows to read documents on your mobile device, but also supports modifying them too. Typos are fixed in a breeze, even on the train!";
6963

7064
/* */
71-
"intro_description_3" = "OpenDocument Reader supports a huge range of other apps to open documents from. A colleague sent a presentation via Gmail? Click the attachment and this app is going to open right away!";
65+
"intro_description_apps" = "OpenDocument Reader supports a huge range of other apps to open documents from. A colleague sent a presentation via Gmail? Click the attachment and this app is going to open right away!";
7266

7367
/* */
7468
"back_to_documents" = "Back to documents";
@@ -79,6 +73,3 @@
7973
/* */
8074
"error" = "Error";
8175

82-
/* */
83-
"failed_to_load_document" = "Failed to load given document. Please try another one while we are working hard to support as many documents as possible. Feel free to contact us via support@opendocument.app for further questions.";
84-

0 commit comments

Comments
 (0)