Commit 342acefa authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fix runtime exception when loading the simple prefs with the Punjabi...

macosx: fix runtime exception when loading the simple prefs with the Punjabi locale active (closes #15106)
parent 8df23063
......@@ -704,15 +704,30 @@ static inline char * __config_GetLabel(vlc_object_t *p_this, const char *psz_nam
[self setupButton:_input_mkv_preload_dirCheckbox forBoolValue: "mkv-preload-local-dir"];
/* do not trust translators to do the correct thing,
* so re-build the menu in an unorthodox way (#15106) */
[_input_cachelevelPopup removeAllItems];
[_input_cachelevelPopup addItemsWithTitles: [NSArray arrayWithObjects:_NS("Custom"), _NS("Lowest latency"),
_NS("Low latency"), _NS("Normal"), _NS("High latency"), _NS("Higher latency"), nil]];
[[_input_cachelevelPopup itemAtIndex: 0] setTag: 0];
[[_input_cachelevelPopup itemAtIndex: 1] setTag: 100];
[[_input_cachelevelPopup itemAtIndex: 2] setTag: 200];
[[_input_cachelevelPopup itemAtIndex: 3] setTag: 300];
[[_input_cachelevelPopup itemAtIndex: 4] setTag: 500];
[[_input_cachelevelPopup itemAtIndex: 5] setTag: 1000];
NSArray *plainTitles = @[@"Custom", @"Lowest latency", @"Low latency", @"Normal", @"High latency", @"Higher latency"];
NSMenuItem *workerItem;
[_input_cachelevelPopup addItemsWithTitles: plainTitles];
workerItem = [_input_cachelevelPopup itemAtIndex: 0];
[workerItem setTag: 0];
[workerItem setTitle:_NS("Custom")];
workerItem = [_input_cachelevelPopup itemAtIndex: 1];
[workerItem setTag: 100];
[workerItem setTitle:_NS("Lowest Latency")];
workerItem = [_input_cachelevelPopup itemAtIndex: 2];
[workerItem setTag: 200];
[workerItem setTitle:_NS("Low Latency")];
workerItem = [_input_cachelevelPopup itemAtIndex: 3];
[workerItem setTag: 300];
[workerItem setTitle:_NS("Normal")];
workerItem = [_input_cachelevelPopup itemAtIndex: 4];
[workerItem setTag: 500];
[workerItem setTitle:_NS("Higher Latency")];
workerItem = [_input_cachelevelPopup itemAtIndex: 5];
[workerItem setTag: 1000];
[workerItem setTitle:_NS("Highest Latency")];
#define TestCaC(name, factor) \
cache_equal = cache_equal && \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment