SRGSSR / srgdataprovider-apple

A library to retrieve SRG SSR unified metadata
MIT License
0 stars 1 forks source link

Non-localized HTTP error messages #6

Closed defagos closed 7 years ago

defagos commented 7 years ago

Sadly, messages returned from +[NSHTTPURLResponse localizedStringForStatusCode:] are not localized. We should provide a set of custom localizations instead.

defagos commented 7 years ago

This is an iOS bug. If printing:

(lldb) po [[NSBundle bundleWithIdentifier:@"com.apple.CFNetwork"] localizedStringForKey:@"bad gateway" value:nil table:nil]

with LLDB, the command namely returns passerelle incorrecte when run on a device using French as main language.

We should create an Apple bug report and fix the issue in the meantime.

defagos commented 7 years ago

I filed an Apple bug report (32731428). A copy of the report is publicly available: http://openradar.appspot.com/radar?id=5498641225613312.

defagos commented 7 years ago

Fixed in commit 924c7194d6089ad8dc42f4d5cdb165706bd92405. This fix is a workaround and will be removed when possible (probably in a few years 😉 ).

defagos commented 7 years ago

There is a TODO in a code to remove the workaround when possible. In the meantime, I'll consider this issue is fixed on our side.