-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the index.html to address the i18n issue #12
Conversation
Update the MiniApp Manifest index.html to address the i18n issues, I rewrite section 6 add a subsection to provide an i18n solution.
Fix the format issue on line 1104
Updated to fix json example format.
Fixed the json example format
<p>i18n/en-US.json</p> | ||
</div> | ||
<pre class="example json"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<p>i18n/en-US.json</p> | |
</div> | |
<pre class="example json"> | |
<pre class="example json" title="i18n/en-US.json"> |
<p>i18n/zh-Hans.json</p> | ||
</div> | ||
<pre class="example json"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<p>i18n/zh-Hans.json</p> | |
</div> | |
<pre class="example json"> | |
<pre class="example json" title="i18n/zh-Hans.json"> |
Note that this is a solution for the localization problem, but did not solve the string metadata problem, i.e., multiple natural language text fields still share the same language/direction, so it won't close issue #4, #5, and #6. |
I'm not sure about it. This proposal allows multiple natural language text fields to be dynamically filled with local language information, such as description, which is filled with "$string:description_application" on the manifest but is actually be translated into the corresponding local language. |
Localization of the whole manifest and language/direction metadata of strings are two different issues. LocalizationIIUC this pull request solves the localization problem. For example, for the following manifest: {
"dir": "ltr",
"lang": "en-US",
"appID": "org.w3c.miniapp",
"name": "$string:name",
"short_name": "string:short_name",
"description": "$string:description_application",
} We can add the following to {
"strings": {
"name":"小程序试用版",
"short_name":"小程序",
"description_application":"迷你程序试用版本",
}
} If the language of the app store is Simplified Chinese, the app store will parse the String metadataThe language of a miniapp is Hebrew does not mean that all strings in the manifest are RTL, and the language of a miniapp is Japanese does not mean that all strings in the manifest are For example, if we have a miniapp whose name is If the miniapp is an English miniapp (dir is If the miniapp is a Hebrew miniapp (dir is You can see the result by looking at how browsers render the following HTML snippet: <p dir="ltr">Easy as one שתיים three</p>
<p dir="rtl">Easy as one שתיים three</p> We can't change the manifest-wide Although miniapp developers could theoretically apply the Unicode directional formatting characters, they are not easy to type and it can be difficult for the developer to know how to use the characters effectively. This is just one example use case for string-specific directional information, and there are others as well. |
Closing this PR because we will use the i18n WG localizable manifest recommendations and follow the Web App manifest approach. |
Update the MiniApp Manifest index.html to address the i18n issues, I rewrite section 6 add a subsection to provide an i18n solution. #4 #5 #6, @aphillips @zhangyongjing @xfq
Preview | Diff