Skip to content

Commit 95930d6

Browse files
author
Thomas Taschauer
committed
Merge branch 'development' of github.com:TomTasche/OpenDocument.ios into development
2 parents 7b05ca8 + 7e6deec commit 95930d6

20 files changed

Lines changed: 294 additions & 276 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: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class DocumentViewController: UIViewController, DocumentDelegate, GADBannerViewD
4141
@IBOutlet weak var menuButton: UIBarButtonItem!
4242
@IBOutlet weak var bannerView: GADBannerView!
4343
@IBOutlet weak var bannerViewHeight: NSLayoutConstraint!
44+
@IBOutlet weak var barButtonItem: UIBarButtonItem!
4445

4546
private var isFullscreen = false
4647

@@ -55,6 +56,8 @@ class DocumentViewController: UIViewController, DocumentDelegate, GADBannerViewD
5556
override func viewWillAppear(_ animated: Bool) {
5657
super.viewWillAppear(animated)
5758

59+
barButtonItem.title = NSLocalizedString("back_to_documents", comment: "")
60+
5861
segmentedControl.segmentStyle = .textOnly
5962
segmentedControl.underlineSelected = true
6063
segmentedControl.fixedSegmentWidth = true
@@ -196,7 +199,7 @@ class DocumentViewController: UIViewController, DocumentDelegate, GADBannerViewD
196199
}
197200

198201
if document?.edit ?? false {
199-
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
200203
self.saveContent(completion: nil)
201204
}))
202205

@@ -211,7 +214,7 @@ class DocumentViewController: UIViewController, DocumentDelegate, GADBannerViewD
211214
alert.addAction(UIAlertAction(title: NSLocalizedString("menu_cloud_print", comment: ""), style: .default, handler: { (_) in
212215
self.printDocument()
213216
}))
214-
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
215218
self.showWebsite()
216219
}))
217220
alert.addAction(UIAlertAction(title: NSLocalizedString("cancel", comment: ""), style: .cancel, handler: nil))
@@ -245,10 +248,10 @@ class DocumentViewController: UIViewController, DocumentDelegate, GADBannerViewD
245248
let message: String
246249
let color: UIColor
247250
if success {
248-
message = NSLocalizedString("alert_document_saved", comment: "")
251+
message = NSLocalizedString("toast_edit_status_saved", comment: "")
249252
color = .green
250253
} else {
251-
message = NSLocalizedString("alert_error_save_failed", comment: "")
254+
message = NSLocalizedString("toast_error_save_failed", comment: "")
252255
color = .red
253256
}
254257

@@ -302,7 +305,7 @@ class DocumentViewController: UIViewController, DocumentDelegate, GADBannerViewD
302305

303306
func documentUpdateContent(_ doc: Document) {
304307
guard let path = document?.result else {
305-
self.webview.loadHTMLString("<html><h1>Loading</h1></html>", baseURL: nil)
308+
self.webview.loadHTMLString("<html><h1>\(NSLocalizedString("loading", comment: ""))</h1></html>", baseURL: nil)
306309

307310
return
308311
}
@@ -320,7 +323,7 @@ class DocumentViewController: UIViewController, DocumentDelegate, GADBannerViewD
320323
})
321324
}
322325

323-
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)
324327
alert.addTextField { (textField) in
325328
textField.text = ""
326329
}
@@ -358,7 +361,7 @@ class DocumentViewController: UIViewController, DocumentDelegate, GADBannerViewD
358361
return;
359362
}
360363

361-
self.webview.loadHTMLString("<html><h1>Error</h1>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.</html>", baseURL: nil)
364+
self.webview.loadHTMLString("<html><h1>\(NSLocalizedString("error", comment: ""))</h1>\(NSLocalizedString("toast_error_generic", comment: ""))</html>", baseURL: nil)
362365

363366
Analytics.logEvent(
364367
"load_error",

OpenDocumentReader/Main.storyboard

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
<connections>
109109
<outlet property="bannerView" destination="yut-lR-gq5" id="28Z-1b-NAN"/>
110110
<outlet property="bannerViewHeight" destination="dMZ-rD-IOK" id="pi7-sH-NwC"/>
111+
<outlet property="barButtonItem" destination="yhO-7V-lbn" id="ach-z7-H9P"/>
111112
<outlet property="menuButton" destination="Vsd-IL-ujz" id="GoN-tp-egn"/>
112113
<outlet property="progressBar" destination="ePk-bQ-fV8" id="nz6-qw-ouf"/>
113114
<outlet property="segmentedControl" destination="sIx-zo-9kG" id="pCn-x0-Z01"/>

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: 17 additions & 16 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,44 @@
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";
41+
"toast_edit_status_saved" = "Document saved";
4542

4643
/* */
47-
"alert_error_save_failed" = "File could not be saved. Please contact support@opendocument.app";
44+
"toast_error_save_failed" = "File could not be saved. Please contact support@opendocument.app";
4845

4946
/* */
50-
"alert_error_password_protected" = "El document està protegit per contrasenya";
47+
"toast_error_password_protected" = "El document està protegit per contrasenya";
5148

5249
/* */
53-
"alert_enter_password" = "Please enter the password to decrypt this document";
50+
"intro_title_open" = "Open and read your ODF file on the go!";
5451

5552
/* */
56-
"intro_title_1" = "Open and read your ODF file on the go!";
53+
"intro_title_edit" = "Found a typo in your document? Now supports modification!";
5754

5855
/* */
59-
"intro_title_2" = "Found a typo in your document? Now supports modification!";
56+
"intro_title_apps" = "Read your documents from within other apps";
6057

6158
/* */
62-
"intro_title_3" = "Read your documents from within other apps";
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.";
6360

6461
/* */
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.";
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!";
6663

6764
/* */
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!";
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!";
6966

7067
/* */
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!";
68+
"back_to_documents" = "Back to documents";
7269

70+
/* */
71+
"loading" = "S'està carregant";
7372

73+
/* */
74+
"error" = "Error";
7475

Lines changed: 17 additions & 16 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,44 @@
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";
41+
"toast_edit_status_saved" = "Document saved";
4542

4643
/* */
47-
"alert_error_save_failed" = "File could not be saved. Please contact support@opendocument.app";
44+
"toast_error_save_failed" = "File could not be saved. Please contact support@opendocument.app";
4845

4946
/* */
50-
"alert_error_password_protected" = "Dokument je chráněn heslem";
47+
"toast_error_password_protected" = "Dokument je chráněn heslem";
5148

5249
/* */
53-
"alert_enter_password" = "Please enter the password to decrypt this document";
50+
"intro_title_open" = "Open and read your ODF file on the go!";
5451

5552
/* */
56-
"intro_title_1" = "Open and read your ODF file on the go!";
53+
"intro_title_edit" = "Found a typo in your document? Now supports modification!";
5754

5855
/* */
59-
"intro_title_2" = "Found a typo in your document? Now supports modification!";
56+
"intro_title_apps" = "Read your documents from within other apps";
6057

6158
/* */
62-
"intro_title_3" = "Read your documents from within other apps";
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.";
6360

6461
/* */
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.";
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!";
6663

6764
/* */
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!";
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!";
6966

7067
/* */
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!";
68+
"back_to_documents" = "Back to documents";
7269

70+
/* */
71+
"loading" = "Probíhá načítání";
7372

73+
/* */
74+
"error" = "Error";
7475

Lines changed: 17 additions & 16 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,44 @@
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";
41+
"toast_edit_status_saved" = "Document saved";
4542

4643
/* */
47-
"alert_error_save_failed" = "File could not be saved. Please contact support@opendocument.app";
44+
"toast_error_save_failed" = "File could not be saved. Please contact support@opendocument.app";
4845

4946
/* */
50-
"alert_error_password_protected" = "Dokumentet er låst med et kodeord";
47+
"toast_error_password_protected" = "Dokumentet er låst med et kodeord";
5148

5249
/* */
53-
"alert_enter_password" = "Please enter the password to decrypt this document";
50+
"intro_title_open" = "Open and read your ODF file on the go!";
5451

5552
/* */
56-
"intro_title_1" = "Open and read your ODF file on the go!";
53+
"intro_title_edit" = "Found a typo in your document? Now supports modification!";
5754

5855
/* */
59-
"intro_title_2" = "Found a typo in your document? Now supports modification!";
56+
"intro_title_apps" = "Read your documents from within other apps";
6057

6158
/* */
62-
"intro_title_3" = "Read your documents from within other apps";
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.";
6360

6461
/* */
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.";
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!";
6663

6764
/* */
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!";
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!";
6966

7067
/* */
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!";
68+
"back_to_documents" = "Back to documents";
7269

70+
/* */
71+
"loading" = "Indlæser";
7372

73+
/* */
74+
"error" = "Error";
7475

0 commit comments

Comments
 (0)