ObjFW  Diff

Differences From Artifact [80430a2785]:

To Artifact [5d8907dfbe]:


508
509
510
511
512
513
514
515


516
517
518
519
520
521
522
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] JSONValue];
		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
534
535
536
537
538
539
540

541
542
543
544
545
546
547
548
549







-
+
+







		return;
	}

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

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

	objc_autoreleasePoolPop(pool);
}
#endif

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