2,123 karma · joined June 21, 2020
https://github.com/david-allison
gmail: davidallisongithub
Sponsors: https://github.com/sponsors/david-allison/
https://opencollective.com/ankidroid
I wouldn't do so if the history were a mess
----
I'll stand by my past point that it was unnecessarily verbose. I'm really glad they're going back to the drawing board with it
* It's (probably) sandboxed
* It's easy to distribute
* It's easier to make an app with a decent (but non-native) UI, compared to other cross-platform toolkits
https://github.blog/changelog/2024-01-30-github-actions-maco...
Why?
----
I'd struggle. It's a trivia question as it has no bearing on modern Java development
Modern IDEs both collapse the import section, and auto-import on the fly
The only reason I'd see the line is:
* Looking up documentation: very rare
* Conflict on the import - unlikely
* Code Reviews - skimmed over
> Abandoned ships are sometimes so old and worn that “even the scrap guys lose money stripping it of anything of value,” said Eric White, a ship inspector for the International Transport Workers’ Federation, or ITF, a seafarers’ union.
> Left hanging by Teeters were the ships’ crews of mostly Ukrainian seafarers, who suddenly had no way of sending money to families back home in what was now a war zone after Russia’s invasion. In total, the 22 men were owed $130,000 covering more than three months, White said. If not for $22,000 in donations from local seafarers’ charities, none of them would have made it off the ship and back home, according to White.
Google:
/storage/emulated/0/MIUI/debug_log/common/tcpdump
This means conversations skew to be constructive/critical/negative.
* https://docs.ankiweb.net/templates/fields.html#hint-fields
* https://docs.ankiweb.net/editing.html#cloze-deletion:~:text=...
Disclaimer: AnkiDroid maintainer
https://learn.microsoft.com/en-us/dotnet/csharp/language-ref...
This is an instance of RAS syndrome: https://en.wikipedia.org/wiki/RAS_syndrome
Snapshot (Sept 30, 2021): https://web.archive.org/web/20210930190513/https://dsresume....
We went down the route of duplicating strings between `/values-heb` and `/values-iw` to fix the platform issues, even though the change from `iw` -> `heb` was enacted in ISO 639:1989.[0]
OP's change is questionable in that it may block regional dialects: `[zh-CN, zh-TW]; [pt-PT, pt-BR]` in case the system default is set incorrectly, but it will suffice for most Android apps which will realistically only be in a small subset of 'easy' languages.
[0] https://xml.coverpages.org/iso639a.html (revised 1989)
The code intends to trim the country, variant and any extensions from the value returned from `Locale.getDefault()`
Example: "Chinese (Traditional) - Taiwan" to "Chinese"
Pseudocode:
`zh_Hant_TW` -> `zh`
It also normalizes to fix some Android internal mapping issues due to changes in ISO 639 (Hebrew can be `iw` or `he[b]`)
The linked code is:
String languageCode = Locale.getDefault().getDisplayLanguage();
Locale locale = new Locale(languageCode);
Locale.setDefault(locale);
But `getDisplayLanguage()` is defined as returning the display name, not the language code:> if the locale is en_US and the default DISPLAY locale is fr_FR, getDisplayLanguage() will return "anglais"
https://developer.android.com/reference/java/util/Locale#get...()
----
This then proceeds to create a locale with a corrupt language code. The language parameter of `Locale` is not validated (besides a null check), and using a corrupt Locale in `Locale.setDefault()` will cause a number of bugs
* The first element should be "use default/system language"
* Language names should be displayed untranslated: "Deutsch, English, français"
* Optionally display the language in the currently selected language