Update using Flutter from China#9338
Conversation
|
|
||
| To configure a proxy, check out the [Dart documentation on proxies][]. | ||
|
|
||
| [Dart documentation on proxies]: {{dart-site}}/tools/pub/troubleshoot#pub-get-fails-from-behind-a-corporate-firewall |
There was a problem hiding this comment.
To fix the link and build:
| [Dart documentation on proxies]: {{dart-site}}/tools/pub/troubleshoot#pub-get-fails-from-behind-a-corporate-firewall | |
| [Dart documentation on proxies]: {{site.dart-site}}/tools/pub/troubleshoot#pub-get-fails-from-behind-a-corporate-firewall |
| using the `flutter-io.cn` server, consider reporting the issue to | ||
| [the issue tracker (镜像问题)](https://github.com/cfug/flutter.cn/issues/new/choose). | ||
|
|
||
| ## Publishing apps |
There was a problem hiding this comment.
Taking a look at the source issue, it seems your addition covers half of the issue.
If I understood the issue correct, the other is that you can't publish to the mirror. So if a user followed the steps in Configuring Flutter to use a mirror site and changed your PUB_HOSTED_URL, publishing won't work. I guess they need to remove this override to publish.
|
@atsansone Are you still on this? |
781661e to
663172c
Compare
|
cc @skyzh to review SJTUG-related content. |
|
@AlexV525 : You are awesome! Thanks for this SME feedback! |
skyzh
left a comment
There was a problem hiding this comment.
rest LGTM, thanks for the pull request!
|
What about the general idea of making this page written or translated in Simplified Chinese? |
Co-authored-by: Alex Li <github@alexv525.com>
Co-authored-by: Alex Li <github@alexv525.com>
@AlexV525 : Great help on this. Thanks! Co-authored-by: Alex Li <github@alexv525.com>
Co-authored-by: Alex Li <github@alexv525.com>
| {{envvarset}}FLUTTER_STORAGE_BASE_URL="https://storage.flutter-io.cn" | ||
| ``` | ||
|
|
||
| 1. Download the Flutter archive from your mirror site. |
There was a problem hiding this comment.
A zip file or a tar file are archive file formats. Going to keep as-is.
| The Flutter team cannot guarantee long-term availability of any mirrors. | ||
| You can use other mirrors if they become available. |
|
@AlexV525 : Let me know if you have questions about the source files. Accounting for platform makes them a little tricky. |
There was a problem hiding this comment.
Thanks for continuing to work on this @atsansone!
I found a few issues that I think should be addressed before this lands, but I don't need to see it again after they are addressed. Unless you want to discuss some of them further, then feel free to tag me :)
As a side note, this PR should be auto staging to https://flutter-docs-prod--pr9338-fix-2556-92qeer86.web.app/community/china now.
There was a problem hiding this comment.
I think this note should stay in English, or at least also provide the English version of this text (first and then Chinese), since it's scattered in a few locations across the website.
In my earlier mentions, I was thinking this note would stay the same and the Chinese version of the text would just be at the top of the "Using Flutter in China" page, for those that navigate there from this note or from searching. I still feel this is probably the better choice for our site.
| {{envvarset}}FLUTTER_STORAGE_BASE_URL="https://storage.flutter-io.cn" | ||
| ``` | ||
|
|
||
| 1. Download the Flutter archive from your mirror site. |
There was a problem hiding this comment.
That's technically true, but it's quite confusing since it uses "archive" to mean two different things in this same step. It reads as if it's telling me to download the entire archive page.
| ``` | ||
|
|
||
| 1. Download the Flutter archive from your mirror site. | ||
| In your preferred browser, go to |
There was a problem hiding this comment.
| In your preferred browser, go to | |
| In your preferred browser, go to the |
|
|
||
| ```terminal | ||
| {{unzip}} {{sdk | replace: "opsys", download-os}}{{file-format}} | ||
| ``` |
There was a problem hiding this comment.
I recommend adding an extra sentence to explicitly explain that they need to use the exact name of the specific bundle they downloaded here. When there are terminal code blocks, readers often just copy paste without much consideration, or they may be new to this type of activity and may not know.
| From this example, `flutter pub get` fetches packages from `flutter-io.cn`, | ||
| in any terminal where you set `PUB_HOSTED_URL` and `FLUTTER_STORAGE_BASE_URL`. |
There was a problem hiding this comment.
What do you intend to mean by "from this example"? "After completing the steps of this procedure"?
|
|
||
| ### Download Flutter archives based on a mirrored URL | ||
|
|
||
| To download Flutter archives from a mirrored URL, |
There was a problem hiding this comment.
I think this section is missing the context of where to get the original storage.googleapis.com links, which is necessary for the steps to work. Perhaps:
| To download Flutter archives from a mirrored URL, | |
| To download Flutter from the [SDK archive][] using a mirrored URL, |
(and add the link definition).
| To change a Google storage site to a CFUG storage site, replace the example | ||
| original URL with the example mirror URL. |
There was a problem hiding this comment.
I'm a bit lost on what this sentence is trying to do. Is it trying to act as an instruction? Or is trying to introduce the following example? I think it would help be more explicit if it's about the following example.
The following example shows how to update an example Flutter download URL
from using Google's archive to using CFUG's mirror.
| {% comment %} Tab panes {% endcomment -%} | ||
| <div class="tab-content"> | ||
| {% for os in page.os-list %} | ||
| {% include_relative _download-urls.md ref-os=os filepath=sdk-path %} |
There was a problem hiding this comment.
This seems to be showing .tar.xz for the Windows tab and .zip for the Linux one.
| Not every mirror supports downloading artifacts using their direct URL. | ||
| {{site.alert.end}} | ||
|
|
||
| ## Configure your machine to publish your package |
There was a problem hiding this comment.
| ## Configure your machine to publish your package | |
| ## Configure your machine to publish a package |
| To download Flutter archives from a mirrored URL, | ||
| replace `storage.googleapis.com` with the URL of your trusted mirror. | ||
| This should improve download speed. | ||
| You can use the mirror URL in other applications to download software. |
There was a problem hiding this comment.
What kind of software is this referring to?
There was a problem hiding this comment.
Dowload tools, such as IDM or Thunder (which is widely used in China)
Fixes flutter#2556 Staged at https://flutter-docs-prod--pr9338-fix-2556-92qeer86.web.app/community/china --------- Co-authored-by: Alex Li <github@alexv525.com> Co-authored-by: Parker Lougheed <parlough@gmail.com>
Fixes flutter#2556 Staged at https://flutter-docs-prod--pr9338-fix-2556-92qeer86.web.app/community/china --------- Co-authored-by: Alex Li <github@alexv525.com> Co-authored-by: Parker Lougheed <parlough@gmail.com>
Fixes #2556
Staged at https://flutter-docs-prod--pr9338-fix-2556-92qeer86.web.app/community/china