Fix wxUILocale documentation formatting
Fix a few problems: - Don't indent lists, as this makes them appear as code. - Prefer using inline `...` to @code ... @endcode. - Escape '<' and '>' characters.
This commit is contained in:
parent
70e119140c
commit
79f6a2a158
@ -104,16 +104,16 @@ enum wxLocaleTagType
|
||||
/// Default type of the system (platform-dependent).
|
||||
wxLOCALE_TAGTYPE_SYSTEM,
|
||||
|
||||
/// BCP47-like type: <language>[-<script>][-<region>][-<modifier>].
|
||||
/// BCP47-like type: \<language\>[-\<script\>][-\<region\>][-\<modifier\>].
|
||||
wxLOCALE_TAGTYPE_BCP47,
|
||||
|
||||
/// macOS type: <language>[-<script>][_<region>].
|
||||
/// macOS type: \<language\>[-\<script\>][_\<region\>].
|
||||
wxLOCALE_TAGTYPE_MACOS,
|
||||
|
||||
/// POSIX type: <language>_<region>[.<charset>][@{<scriptalias>|<modifier>}].
|
||||
/// POSIX type: \<language\>_\<region\>[.\<charset\>][@@{\<scriptalias\>|\<modifier\>}].
|
||||
wxLOCALE_TAGTYPE_POSIX,
|
||||
|
||||
/// Windows type: <language>[-<script>][-<region>][-<extension>][_<sortorder>].
|
||||
/// Windows type: \<language\>[-\<script\>][-\<region\>][-\<extension\>][_\<sortorder\>].
|
||||
wxLOCALE_TAGTYPE_WINDOWS
|
||||
};
|
||||
|
||||
|
@ -311,13 +311,13 @@ wxString wxGetUIDateFormat();
|
||||
|
||||
There are two possible ways to construct wxLocaleIdent:
|
||||
|
||||
- You can either use FromTag() to create it from a string in the form
|
||||
@code language ["-" script] ["-" region] @endcode, corresponding to
|
||||
the subset of BCP 47 (https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
|
||||
syntax.
|
||||
- Or you can create it from the different parts of this string by using
|
||||
the default constructor and then chaining calls to Language(),
|
||||
Region(), Script() and other methods.
|
||||
- You can either use FromTag() to create it from a string in the form
|
||||
`language ["-" script] ["-" region]`, corresponding to
|
||||
the subset of BCP 47 (https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
|
||||
syntax.
|
||||
- Or you can create it from the different parts of this string by using
|
||||
the default constructor and then chaining calls to Language(),
|
||||
Region(), Script() and other methods.
|
||||
|
||||
The first method is useful for interoperating with the other software using
|
||||
BCP 47 language tags, while the second one may may result in more readable
|
||||
@ -349,24 +349,24 @@ public:
|
||||
|
||||
This method accepts locale tags in various formats:
|
||||
|
||||
- BCP-47,
|
||||
- Windows,
|
||||
- POSIX, and
|
||||
- macOS.
|
||||
- BCP-47,
|
||||
- Windows,
|
||||
- POSIX, and
|
||||
- macOS.
|
||||
|
||||
See section 2.01 of https://www.rfc-editor.org/rfc/bcp/bcp47.txt for the
|
||||
full BCP-47 syntax. Here we fully support just the subset we're interested in:
|
||||
|
||||
- Normal language tags (not private use or grandfathered ones),
|
||||
- Script, and
|
||||
- Region.
|
||||
- Normal language tags (not private use or grandfathered ones),
|
||||
- Script, and
|
||||
- Region.
|
||||
|
||||
Additionally platform-specific tags are supported:
|
||||
|
||||
- Extensions (without validity checks) (Windows only),
|
||||
- Sortorder (Windows only)
|
||||
- Charset (POSIX only), and
|
||||
- Modifier (POSIX only).
|
||||
- Extensions (without validity checks) (Windows only),
|
||||
- Sortorder (Windows only)
|
||||
- Charset (POSIX only), and
|
||||
- Modifier (POSIX only).
|
||||
|
||||
Only language, script, and region are supported across all platforms.
|
||||
The script tag is mapped to the modifier tag for POSIX platforms.
|
||||
@ -374,18 +374,18 @@ public:
|
||||
|
||||
The following tag syntax is accepted:
|
||||
|
||||
BCP-47: <language>[-<script>][-<region>][-<extension>]
|
||||
Windows: <language>[-<script>][-<region>][-<extension>][_<sortorder>]
|
||||
POSIX: <language>[_<region>][.<charset>][@<modifier>]
|
||||
macOS: <language>[-<script>][_<region>]
|
||||
- BCP-47: \<language\>[-\<script\>][-\<region\>][-\<extension\>]
|
||||
- Windows: \<language\>[-\<script\>][-\<region\>][-\<extension\>][_\<sortorder\>]
|
||||
- POSIX: \<language\>[_\<region\>][.\<charset\>][@@\<modifier\>]
|
||||
- macOS: \<language\>[-\<script\>][_\<region\>]
|
||||
|
||||
The string must contain at least the language part (2 or 3 ASCII
|
||||
letters) and may contain script and region separated by dashes, i.e.
|
||||
all of the following are valid:
|
||||
|
||||
- "mn"
|
||||
- "mn-MN"
|
||||
- "mn-Cyrl-MN"
|
||||
- "mn"
|
||||
- "mn-MN"
|
||||
- "mn-Cyrl-MN"
|
||||
|
||||
Note that while BCP 47 extlangs, variants, extensions, private use and
|
||||
grandfathered tags are currently not directly supported, they may still
|
||||
@ -479,7 +479,7 @@ public:
|
||||
Note that this value is only used under Windows systems and simply ignored
|
||||
under the other ones.
|
||||
|
||||
Return reference to @this for method chaining.
|
||||
Return reference to `this` for method chaining.
|
||||
|
||||
@param extension
|
||||
Extension identifiers allow to support custom Windows locales.
|
||||
@ -494,7 +494,7 @@ public:
|
||||
Note that this value is only used under Windows systems and simply ignored
|
||||
under the other ones.
|
||||
|
||||
Return reference to @this for method chaining.
|
||||
Return reference to `this` for method chaining.
|
||||
|
||||
@param sortorder
|
||||
Sortorder identifiers are defined in the Windows Development documentation:
|
||||
@ -525,22 +525,24 @@ public:
|
||||
|
||||
/**
|
||||
Construct platform dependent name.
|
||||
|
||||
Format:
|
||||
Windows: \<language\>-\<script\>-\<REGION\>-\<extension\>_\<sortorder\>
|
||||
Unix: \<language\>_\<REGION\>.\<charset\>@\{\<modifier\>\|\<scriptalias\>\}
|
||||
MacOS: \<language\>-\<script\>_\<REGION\>
|
||||
- Windows: \<language\>-\<script\>-\<REGION\>-\<extension\>_\<sortorder\>
|
||||
- Unix: \<language\>_\<REGION\>.\<charset\>@@{\<modifier\>\|\<scriptalias\>}
|
||||
- MacOS: \<language\>-\<script\>_\<REGION\>
|
||||
*/
|
||||
wxString GetName() const;
|
||||
|
||||
/**
|
||||
Construct name in specified format.
|
||||
|
||||
Format:
|
||||
Default: name as used in wxLocaleIdent::FromTag() or system format
|
||||
System: name in platform-dependent format
|
||||
Windows: \<language\>-\<script\>-\<REGION\>-\<extension\>_\<sortorder\>
|
||||
Unix: \<language\>_\<REGION\>.\<charset\>@\<modifier\>
|
||||
MacOS: \<language\>-\<script\>_\<REGION\>
|
||||
BCP 47: \<language\>-\<script\>-\<REGION\>-\<extension\>
|
||||
- Default: name as used in wxLocaleIdent::FromTag() or system format
|
||||
- System: name in platform-dependent format
|
||||
- Windows: \<language\>-\<script\>-\<REGION\>-\<extension\>_\<sortorder\>
|
||||
- Unix: \<language\>_\<REGION\>.\<charset\>@@\<modifier\>
|
||||
- MacOS: \<language\>-\<script\>_\<REGION\>
|
||||
- BCP 47: \<language\>-\<script\>-\<REGION\>-\<extension\>
|
||||
|
||||
@param tagType
|
||||
Value from wxLocaleTagType enum.
|
||||
|
Loading…
Reference in New Issue
Block a user