Differences From Artifact [0a1b003490]:
- File src/OFLocalization.m — part of check-in [4c8d02cc0d] at 2017-01-18 03:45:05 on branch trunk — Move parsing of encoding names to a single place (user: js, size: 6457) [annotate] [blame] [check-ins using]
To Artifact [b0fb42c722]:
- File
src/OFLocalization.m
— part of check-in
[0e82e3b843]
at
2017-02-27 22:04:21
on branch trunk
— OFLocalization: Don't lower language and territory
Instead, lowercase it before looking it up.
This allows getting the original values provided by setlocale(). (user: js, size: 6284) [annotate] [blame] [check-ins using]
| ︙ | |||
79 80 81 82 83 84 85 | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | - |
return self;
}
locale = of_strdup(locale);
@try {
char *tmp;
|
| ︙ | |||
104 105 106 107 108 109 110 | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | - - - - - + - - - - - - + - |
}
}
/* Territory */
if ((tmp = strrchr(locale, '_')) != NULL) {
*tmp++ = '\0';
|
| ︙ | |||
155 156 157 158 159 160 161 | 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | - + + + + - + - + |
- (void)addLanguageDirectory: (OFString*)path
{
void *pool = objc_autoreleasePoolPush();
OFString *mapPath =
[path stringByAppendingPathComponent: @"languages.json"];
OFDictionary *map =
[[OFString stringWithContentsOfFile: mapPath] JSONValue];
|
| ︙ |