ObjFW  Diff

Differences From Artifact [5d8907dfbe]:

To Artifact [b6b16348ac]:


508
509
510
511
512
513
514
515
516


517
518
519
520
521
522
523
508
509
510
511
512
513
514


515
516
517
518
519
520
521
522
523







-
-
+
+







	if (_language == nil)
		return;

	pool = objc_autoreleasePoolPush();

	mapPath = [path stringByAppendingPathComponent: @"languages.json"];
	@try {
		map = [OFString stringWithContentsOfFile: mapPath]
		    .objectByParsingJSON;
		map = [[OFString stringWithContentsOfFile: mapPath]
		     objectByParsingJSON];
	} @catch (OFOpenItemFailedException *e) {
		objc_autoreleasePoolPop(pool);
		return;
	}

	language = _language.lowercaseString;
	territory = _territory.lowercaseString;
533
534
535
536
537
538
539
540

541
542

543
544
545
546
547
548
549
533
534
535
536
537
538
539

540


541
542
543
544
545
546
547
548







-
+
-
-
+







		objc_autoreleasePoolPop(pool);
		return;
	}

	languageFile = [path stringByAppendingPathComponent:
	    [languageFile stringByAppendingString: @".json"]];

	[_localizedStrings addObject:
	[_localizedStrings addObject: [[OFString stringWithContentsOfFile:
	    [OFString stringWithContentsOfFile: languageFile]
	    .objectByParsingJSON];
	    languageFile] objectByParsingJSON]];

	objc_autoreleasePoolPop(pool);
}
#endif

- (OFString *)localizedStringForID: (OFConstantString *)ID
			  fallback: (id)fallback, ...