Skip to content

Commit d65abf0

Browse files
author
Thomas Taschauer
committed
update core, improve German translation
1 parent a091598 commit d65abf0

5 files changed

Lines changed: 67 additions & 36 deletions

File tree

OpenDocument.core

OpenDocumentReader.xcodeproj/project.pbxproj

Lines changed: 49 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
E23795302274844400BA7238 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E237952F2274844400BA7238 /* AdSupport.framework */; };
2323
E26C39392250DC6E009C484A /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E26C39382250DC6E009C484A /* WebKit.framework */; };
2424
E29E4077225A4672002C06E6 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = E29E4076225A4672002C06E6 /* GoogleService-Info.plist */; };
25+
E2B55504245F13570077ED85 /* libodr_oldms.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E2B55503245F13570077ED85 /* libodr_oldms.a */; };
2526
E2C008FA220F1CF80097C594 /* CoreWrapper.mm in Sources */ = {isa = PBXBuildFile; fileRef = E2C008F9220F1CF80097C594 /* CoreWrapper.mm */; };
2627
E2C8C15C2441B27F00B46ABE /* libodr-static.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E22E08EB2441B187001A374C /* libodr-static.a */; };
2728
E2D0B3D9226D945400534FCC /* StoreReviewHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2D0B3D8226D945400534FCC /* StoreReviewHelper.swift */; };
@@ -158,70 +159,70 @@
158159
isa = PBXContainerItemProxy;
159160
containerPortal = E21C596324308C3E0076C37C /* Project.xcodeproj */;
160161
proxyType = 1;
161-
remoteGlobalIDString = 863F42349A2B4C2DAA6F4BF4;
162+
remoteGlobalIDString = 4B6E795B0D8C417A98BD129E;
162163
remoteInfo = "cryptopp-object";
163164
};
164165
E21C59B124308C720076C37C /* PBXContainerItemProxy */ = {
165166
isa = PBXContainerItemProxy;
166167
containerPortal = E21C596324308C3E0076C37C /* Project.xcodeproj */;
167168
proxyType = 1;
168-
remoteGlobalIDString = 60818655F7794064BBA36A8B;
169+
remoteGlobalIDString = E0ABB238A9EC470EBEBB62B5;
169170
remoteInfo = glog;
170171
};
171172
E21C59B324308C720076C37C /* PBXContainerItemProxy */ = {
172173
isa = PBXContainerItemProxy;
173174
containerPortal = E21C596324308C3E0076C37C /* Project.xcodeproj */;
174175
proxyType = 1;
175-
remoteGlobalIDString = 9BF06105F33B4BCBB05D5967;
176+
remoteGlobalIDString = EEAA521A80BA460389C970FA;
176177
remoteInfo = miniz;
177178
};
178179
E21C59B724308C720076C37C /* PBXContainerItemProxy */ = {
179180
isa = PBXContainerItemProxy;
180181
containerPortal = E21C596324308C3E0076C37C /* Project.xcodeproj */;
181182
proxyType = 1;
182-
remoteGlobalIDString = 84FA96B9189D4AE7B520FB4D;
183+
remoteGlobalIDString = C6EFE10CADE1477989491291;
183184
remoteInfo = odr_access;
184185
};
185186
E21C59B924308C720076C37C /* PBXContainerItemProxy */ = {
186187
isa = PBXContainerItemProxy;
187188
containerPortal = E21C596324308C3E0076C37C /* Project.xcodeproj */;
188189
proxyType = 1;
189-
remoteGlobalIDString = B2BD8B2346414E67A2654A47;
190+
remoteGlobalIDString = 4F3F25AF554D46488C577608;
190191
remoteInfo = odr_common;
191192
};
192193
E21C59BB24308C720076C37C /* PBXContainerItemProxy */ = {
193194
isa = PBXContainerItemProxy;
194195
containerPortal = E21C596324308C3E0076C37C /* Project.xcodeproj */;
195196
proxyType = 1;
196-
remoteGlobalIDString = C20B4F00424241B3A7416861;
197+
remoteGlobalIDString = 40524A5BF9B24973BA48EBC1;
197198
remoteInfo = odr_crypto;
198199
};
199200
E21C59BD24308C720076C37C /* PBXContainerItemProxy */ = {
200201
isa = PBXContainerItemProxy;
201202
containerPortal = E21C596324308C3E0076C37C /* Project.xcodeproj */;
202203
proxyType = 1;
203-
remoteGlobalIDString = 2D9075A052EF4DDC94D2010B;
204+
remoteGlobalIDString = 010BFDD8714043BC86CBA0CF;
204205
remoteInfo = odr_odf;
205206
};
206207
E21C59BF24308C720076C37C /* PBXContainerItemProxy */ = {
207208
isa = PBXContainerItemProxy;
208209
containerPortal = E21C596324308C3E0076C37C /* Project.xcodeproj */;
209210
proxyType = 1;
210-
remoteGlobalIDString = 74E01B09B06E4D5ABBACC785;
211+
remoteGlobalIDString = 3F5AABCACC2A4378A239114A;
211212
remoteInfo = odr_ooxml;
212213
};
213214
E21C59C124308C720076C37C /* PBXContainerItemProxy */ = {
214215
isa = PBXContainerItemProxy;
215216
containerPortal = E21C596324308C3E0076C37C /* Project.xcodeproj */;
216217
proxyType = 1;
217-
remoteGlobalIDString = CF2AC648DB984EE4A4D59C4B;
218+
remoteGlobalIDString = 91BA4DA8A3204A52B26474EA;
218219
remoteInfo = odr_svm;
219220
};
220221
E21C59C324308C720076C37C /* PBXContainerItemProxy */ = {
221222
isa = PBXContainerItemProxy;
222223
containerPortal = E21C596324308C3E0076C37C /* Project.xcodeproj */;
223224
proxyType = 1;
224-
remoteGlobalIDString = B225F7F4ECA74B2EBB0F905B;
225+
remoteGlobalIDString = A23EED49777444A892DE00A7;
225226
remoteInfo = tinyxml2;
226227
};
227228
E22E08E62441B187001A374C /* PBXContainerItemProxy */ = {
@@ -245,11 +246,25 @@
245246
remoteGlobalIDString = 94CADBFF2C3C41F7BD0C332C;
246247
remoteInfo = "odr-static";
247248
};
249+
E2B55502245F13570077ED85 /* PBXContainerItemProxy */ = {
250+
isa = PBXContainerItemProxy;
251+
containerPortal = E21C596324308C3E0076C37C /* Project.xcodeproj */;
252+
proxyType = 2;
253+
remoteGlobalIDString = B07595C8B31F496C995B72CD;
254+
remoteInfo = odr_oldms;
255+
};
256+
E2B55505245F13660077ED85 /* PBXContainerItemProxy */ = {
257+
isa = PBXContainerItemProxy;
258+
containerPortal = E21C596324308C3E0076C37C /* Project.xcodeproj */;
259+
proxyType = 1;
260+
remoteGlobalIDString = E1A516391F9743A599E88280;
261+
remoteInfo = odr_oldms;
262+
};
248263
E2C8C15D2441B28900B46ABE /* PBXContainerItemProxy */ = {
249264
isa = PBXContainerItemProxy;
250265
containerPortal = E21C596324308C3E0076C37C /* Project.xcodeproj */;
251266
proxyType = 1;
252-
remoteGlobalIDString = 94E93754000A4FB18C74638A;
267+
remoteGlobalIDString = AD8F5D553FD64F7AA415E03E;
253268
remoteInfo = "odr-static";
254269
};
255270
/* End PBXContainerItemProxy section */
@@ -316,6 +331,7 @@
316331
E2C8C15C2441B27F00B46ABE /* libodr-static.a in Frameworks */,
317332
E2D2F06C2441BB5600C2F88E /* libtinyxml2.a in Frameworks */,
318333
E2D2F0692441BB5600C2F88E /* libodr_odf.a in Frameworks */,
334+
E2B55504245F13570077ED85 /* libodr_oldms.a in Frameworks */,
319335
E23795302274844400BA7238 /* AdSupport.framework in Frameworks */,
320336
E2D2F0662441BB5500C2F88E /* libodr_access.a in Frameworks */,
321337
E26C39392250DC6E009C484A /* WebKit.framework in Frameworks */,
@@ -361,6 +377,7 @@
361377
E21C599424308C3E0076C37C /* libodr_common.a */,
362378
E21C599624308C3E0076C37C /* libodr_crypto.a */,
363379
E21C599824308C3E0076C37C /* libodr_odf.a */,
380+
E2B55503245F13570077ED85 /* libodr_oldms.a */,
364381
E21C599A24308C3E0076C37C /* libodr_ooxml.a */,
365382
E21C599C24308C3E0076C37C /* libodr_svm.a */,
366383
E21C599E24308C3E0076C37C /* libtinyxml2.a */,
@@ -443,6 +460,7 @@
443460
buildRules = (
444461
);
445462
dependencies = (
463+
E2B55506245F13660077ED85 /* PBXTargetDependency */,
446464
E2C8C15E2441B28900B46ABE /* PBXTargetDependency */,
447465
E21C59AE24308C720076C37C /* PBXTargetDependency */,
448466
E21C59B224308C720076C37C /* PBXTargetDependency */,
@@ -653,6 +671,13 @@
653671
remoteRef = E22E08EA2441B187001A374C /* PBXContainerItemProxy */;
654672
sourceTree = BUILT_PRODUCTS_DIR;
655673
};
674+
E2B55503245F13570077ED85 /* libodr_oldms.a */ = {
675+
isa = PBXReferenceProxy;
676+
fileType = archive.ar;
677+
path = libodr_oldms.a;
678+
remoteRef = E2B55502245F13570077ED85 /* PBXContainerItemProxy */;
679+
sourceTree = BUILT_PRODUCTS_DIR;
680+
};
656681
/* End PBXReferenceProxy section */
657682

658683
/* Begin PBXResourcesBuildPhase section */
@@ -804,6 +829,11 @@
804829
name = tinyxml2;
805830
targetProxy = E21C59C324308C720076C37C /* PBXContainerItemProxy */;
806831
};
832+
E2B55506245F13660077ED85 /* PBXTargetDependency */ = {
833+
isa = PBXTargetDependency;
834+
name = odr_oldms;
835+
targetProxy = E2B55505245F13660077ED85 /* PBXContainerItemProxy */;
836+
};
807837
E2C8C15E2441B28900B46ABE /* PBXTargetDependency */ = {
808838
isa = PBXTargetDependency;
809839
name = "odr-static";
@@ -919,7 +949,7 @@
919949
BUNDLE_ID_SUFFIX = .lite;
920950
CLANG_ENABLE_MODULES = YES;
921951
CODE_SIGN_STYLE = Automatic;
922-
CURRENT_PROJECT_VERSION = 18;
952+
CURRENT_PROJECT_VERSION = 19;
923953
DEVELOPMENT_TEAM = 5LS6X97G6J;
924954
HEADER_SEARCH_PATHS = (
925955
"$(inherited)",
@@ -932,7 +962,7 @@
932962
"@executable_path/Frameworks",
933963
);
934964
LIBRARY_SEARCH_PATHS = "$(inherited)";
935-
MARKETING_VERSION = 1.14;
965+
MARKETING_VERSION = 1.15;
936966
PRODUCT_BUNDLE_IDENTIFIER = at.tomtasche.reader.lite1;
937967
PRODUCT_NAME = "$(BUNDLE_DISPLAY_NAME)";
938968
SWIFT_OBJC_BRIDGING_HEADER = OpenDocumentReader/BridgingHeader.h;
@@ -1009,7 +1039,7 @@
10091039
BUNDLE_ID_SUFFIX = .lite;
10101040
CLANG_ENABLE_MODULES = YES;
10111041
CODE_SIGN_STYLE = Automatic;
1012-
CURRENT_PROJECT_VERSION = 18;
1042+
CURRENT_PROJECT_VERSION = 19;
10131043
DEVELOPMENT_TEAM = 5LS6X97G6J;
10141044
HEADER_SEARCH_PATHS = (
10151045
"$(inherited)",
@@ -1022,7 +1052,7 @@
10221052
"@executable_path/Frameworks",
10231053
);
10241054
LIBRARY_SEARCH_PATHS = "$(inherited)";
1025-
MARKETING_VERSION = 1.14;
1055+
MARKETING_VERSION = 1.15;
10261056
PRODUCT_BUNDLE_IDENTIFIER = at.tomtasche.reader.lite1;
10271057
PRODUCT_NAME = "$(BUNDLE_DISPLAY_NAME)";
10281058
SWIFT_OBJC_BRIDGING_HEADER = OpenDocumentReader/BridgingHeader.h;
@@ -1162,7 +1192,7 @@
11621192
BUNDLE_ID_SUFFIX = "";
11631193
CLANG_ENABLE_MODULES = YES;
11641194
CODE_SIGN_STYLE = Automatic;
1165-
CURRENT_PROJECT_VERSION = 18;
1195+
CURRENT_PROJECT_VERSION = 19;
11661196
DEVELOPMENT_TEAM = 5LS6X97G6J;
11671197
HEADER_SEARCH_PATHS = (
11681198
"$(inherited)",
@@ -1175,7 +1205,7 @@
11751205
"@executable_path/Frameworks",
11761206
);
11771207
LIBRARY_SEARCH_PATHS = "$(inherited)";
1178-
MARKETING_VERSION = 1.14;
1208+
MARKETING_VERSION = 1.15;
11791209
PRODUCT_BUNDLE_IDENTIFIER = "at.tomtasche.reader$(BUNDLE_ID_SUFFIX)";
11801210
PRODUCT_NAME = "$(BUNDLE_DISPLAY_NAME)";
11811211
SWIFT_OBJC_BRIDGING_HEADER = OpenDocumentReader/BridgingHeader.h;
@@ -1194,7 +1224,7 @@
11941224
BUNDLE_ID_SUFFIX = "";
11951225
CLANG_ENABLE_MODULES = YES;
11961226
CODE_SIGN_STYLE = Automatic;
1197-
CURRENT_PROJECT_VERSION = 18;
1227+
CURRENT_PROJECT_VERSION = 19;
11981228
DEVELOPMENT_TEAM = 5LS6X97G6J;
11991229
HEADER_SEARCH_PATHS = (
12001230
"$(inherited)",
@@ -1207,7 +1237,7 @@
12071237
"@executable_path/Frameworks",
12081238
);
12091239
LIBRARY_SEARCH_PATHS = "$(inherited)";
1210-
MARKETING_VERSION = 1.14;
1240+
MARKETING_VERSION = 1.15;
12111241
PRODUCT_BUNDLE_IDENTIFIER = "at.tomtasche.reader$(BUNDLE_ID_SUFFIX)";
12121242
PRODUCT_NAME = "$(BUNDLE_DISPLAY_NAME)";
12131243
SWIFT_OBJC_BRIDGING_HEADER = OpenDocumentReader/BridgingHeader.h;

OpenDocumentReader/CoreWrapper.mm

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

1111
#import "CoreWrapper.h"
1212

13-
#include "odr/Reader.h"
13+
#include "odr/Document.h"
1414
#include "odr/Config.h"
1515
#include "odr/Meta.h"
1616

1717
@implementation CoreWrapper {
18-
odr::Reader translator;
18+
odr::DocumentNoExcept *translator;
1919
bool initialized;
2020
}
2121

@@ -25,17 +25,18 @@ - (bool)translate:(NSString *)inputPath into:(NSString *)outputPath at:(NSNumber
2525
_errorCode = 0;
2626

2727
if (!initialized) {
28-
bool opened = translator.open([inputPath cStringUsingEncoding:NSUTF8StringEncoding]);
29-
if (!opened) {
28+
translator = odr::DocumentNoExcept::open([inputPath cStringUsingEncoding:NSUTF8StringEncoding]).release();
29+
30+
if (translator == nullptr) {
3031
_errorCode = @(-1);
3132
return false;
3233
}
3334

34-
const auto meta = translator.meta();
35+
const auto meta = translator->meta();
3536

3637
bool decrypted = !meta.encrypted;
3738
if (password != nil) {
38-
decrypted = translator.decrypt([password cStringUsingEncoding:NSUTF8StringEncoding]);
39+
decrypted = translator->decrypt([password cStringUsingEncoding:NSUTF8StringEncoding]);
3940
}
4041

4142
if (!decrypted) {
@@ -64,7 +65,7 @@ - (bool)translate:(NSString *)inputPath into:(NSString *)outputPath at:(NSNumber
6465
config.entryCount = 1;
6566
config.tableLimitRows = 10000;
6667

67-
bool translated = translator.translate([outputPath cStringUsingEncoding:NSUTF8StringEncoding], config);
68+
bool translated = translator->translate([outputPath cStringUsingEncoding:NSUTF8StringEncoding], config);
6869
if (!translated) {
6970
_errorCode = @(-4);
7071
return false;
@@ -83,13 +84,13 @@ - (bool)backTranslate:(NSString *)diff into:(NSString *)outputPath {
8384
try {
8485
_errorCode = 0;
8586

86-
bool success = translator.edit([diff cStringUsingEncoding:NSUTF8StringEncoding]);
87+
bool success = translator->edit([diff cStringUsingEncoding:NSUTF8StringEncoding]);
8788
if (!success) {
8889
_errorCode = @(-4);
8990
return false;
9091
}
9192

92-
success = translator.save([outputPath cStringUsingEncoding:NSUTF8StringEncoding]);
93+
success = translator->save([outputPath cStringUsingEncoding:NSUTF8StringEncoding]);
9394
if (!success) {
9495
_errorCode = @(-5);
9596
return false;

OpenDocumentReader/Document.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class Document: UIDocument {
122122
DispatchQueue.main.sync {
123123
self.saveGroup.enter()
124124

125-
webview?.evaluateJavaScript("generateDiff()", completionHandler: { (value: Any!, error: Error!) -> Void in
125+
webview?.evaluateJavaScript("odr.generateDiff()", completionHandler: { (value: Any!, error: Error!) -> Void in
126126
if error != nil {
127127
Crashlytics.crashlytics().record(error: error)
128128
fatalError("generateDiff failed")

OpenDocumentReader/de.lproj/Localizable.strings

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
"no_description" = "Keine Beschreibung";
99

1010
/* */
11-
"alert_unsaved_changes" = "You have unsaved changes";
11+
"alert_unsaved_changes" = "Du hast ungespeicherte Änderungen";
1212

1313
/* */
14-
"alert_save_now" = "Save them now?";
14+
"alert_save_now" = "Änderungen speichern?";
1515

1616
/* */
1717
"yes" = "Ja";
@@ -26,7 +26,7 @@
2626
"menu_save" = "Speichern";
2727

2828
/* */
29-
"menu_discard_changes" = "Discard changes";
29+
"menu_discard_changes" = "Änderungen verwerfen";
3030

3131
/* */
3232
"menu_fullscreen" = "Vollbildmodus aktivieren";
@@ -38,19 +38,19 @@
3838
"menu_help" = "Hilfe!?";
3939

4040
/* */
41-
"cancel" = "Cancel";
41+
"cancel" = "Abbrechen";
4242

4343
/* */
4444
"alert_document_saved" = "Dokument gespeichert";
4545

4646
/* */
47-
"alert_error_save_failed" = "File could not be saved. Please contact support@opendocument.app";
47+
"alert_error_save_failed" = "Dokument konnte nicht gespeichert werden. Bitte kontaktiere uns unter support@opendocument.app";
4848

4949
/* */
5050
"alert_error_password_protected" = "Dokument ist passwort-geschützt";
5151

5252
/* */
53-
"alert_enter_password" = "Please enter the password to decrypt this document";
53+
"alert_enter_password" = "Bitte gib das Passwort für dieses Dokument ein";
5454

5555
/* */
5656
"intro_title_1" = "Öffnen und lesen Sie Ihre ODF-Datei unterwegs!";

0 commit comments

Comments
 (0)