Open swift-ci opened 8 years ago
I don't think we can do that in this fully general case without a locale to attempt transliteration by. (You put "ni" and "ri" but what about Korean "il"?) But we could try for kana and other characters with standardized romanization*, and almost certainly for accented roman characters. Though this is possibly not something to handle in the Swift project at all; may be better suited to an IDE.
* …although then what gets matched for し: "si" or "shi"? I think anything we do for a non-Roman alphabet should be driven by a native speaker and/or localization expert, not what we think is right.
Comment by Maxwell Swadling (JIRA)
I agree it should depend on the user's locale, so code completion options might need a locale setting. A client could use Foundation to guess the locale from the open document and if none is provided default to none. The locale would be passed straight through to ICU. I think ICU's transliterator definition should be sufficient for correctness (and consistent with other applications!).
Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | CodeCompletion | |Labels | Improvement | |Assignee | None | |Priority | Medium | md5: 287588e11444ae51eaca287f0e6fba64Issue Description:
If I have the program:
let 日本 = "Japan!"
Then code completion should consider the following as prefix matches for the 日本 identifier by transliteration or normalization:
ni
ri
に