Skip to content

Commit

Permalink
Update: Site variables
Browse files Browse the repository at this point in the history
  • Loading branch information
AmosHuKe committed Jun 26, 2024
1 parent de43400 commit 36726aa
Show file tree
Hide file tree
Showing 491 changed files with 5,955 additions and 5,943 deletions.
76 changes: 38 additions & 38 deletions src/_data/site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,51 +12,51 @@ default_share_image: /assets/images/cn/flutter-cn-logo.png
github_username: cfug
branch: main
repo:
organization: https://github.com/flutter
this: https://github.com/cfug/flutter.cn
flutter: https://github.com/flutter/flutter
samples: https://github.com/flutter/samples
packages: https://github.com/flutter/packages
gallery-archive: https://github.com/flutter/gallery
engine: https://github.com/flutter/engine
uxr: https://github.com/flutter/uxr
wonderous: https://github.com/gskinnerTeam/flutter-wonderous-app
organization: https://github.com/flutter/
this: https://github.com/cfug/flutter.cn/
flutter: https://github.com/flutter/flutter/
samples: https://github.com/flutter/samples/
packages: https://github.com/flutter/packages/
gallery-archive: https://github.com/flutter/gallery/
engine: https://github.com/flutter/engine/
uxr: https://github.com/flutter/uxr/
wonderous: https://github.com/gskinnerTeam/flutter-wonderous-app/
dart:
api: https://api.dart.cn
api: https://api.dart.cn/
sdk:
channel: stable
sdk:
channel: stable # When changing this value also update it in src/_assets/js/archive.js
social:
twitter: https://twitter.com/FlutterDev
youtube: https://www.youtube.com/@flutterdev
dart-site: https://dart.cn
news: https://news.dartlang.org
api: https://api.flutter-io.cn
main-api: https://main-api.flutter-io.cn
pub: https://pub-web.flutter-io.cn
pub-api: https://pub-web.flutter-io.cn/documentation
pub-pkg: https://pub-web.flutter-io.cn/packages
flutter-medium: https://medium.com/flutter
medium: https://medium.com
dartpad: https://dartpad.cn
gallery-archive: https://gallery.flutter.cn
material: https://m3.material-io.cn
material2: https://m2.material.io
so: https://stackoverflow.com
github: https://github.com
flutter-assets: https://flutter.github.io/assets-for-api-docs/assets
android-dev: https://developer.android.google.cn
apple-dev: https://developer.apple.com
google-blog: https://developers.googleblog.com
developers: https://developers.google.cn
codelabs: https://codelabs.developers.google.com
codelabs-cn: https://codelabs.flutter-io.cn # docs.flutter.cn
flutter-files-cn: https://files.flutter-io.cn # docs.flutter.cn
groups: https://groups.google.com
firebase: https://firebase.google.cn
twitter: https://twitter.com/FlutterDev/
youtube: https://www.youtube.com/@flutterdev/
dart-site: https://dart.cn/
news: https://news.dartlang.org/
api: https://api.flutter-io.cn/
main-api: https://main-api.flutter-io.cn/
pub: https://pub-web.flutter-io.cn/
pub-api: https://pub-web.flutter-io.cn/documentation/
pub-pkg: https://pub-web.flutter-io.cn/packages/
flutter-medium: https://medium.com/flutter/
medium: https://medium.com/
dartpad: https://dartpad.cn/
gallery-archive: https://gallery.flutter.cn/
material: https://m3.material-io.cn/
material2: https://m2.material.io/
so: https://stackoverflow.com/
github: https://github.com/
flutter-assets: https://flutter.github.io/assets-for-api-docs/assets/
android-dev: https://developer.android.google.cn/
apple-dev: https://developer.apple.com/
google-blog: https://developers.googleblog.com/
developers: https://developers.google.cn/
codelabs: https://codelabs.developers.google.com/
codelabs-cn: https://codelabs.flutter-io.cn/ # docs.flutter.cn
flutter-files-cn: https://files.flutter-io.cn/ # docs.flutter.cn
groups: https://groups.google.com/
firebase: https://firebase.google.cn/
wonderous: https://wonderous.app/
youtube-site: https://youtube.com
youtube-site: https://youtube.com/

yt:
set: 'frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen loading="lazy"'
Expand Down
2 changes: 1 addition & 1 deletion src/_includes/docs/admonitions/tip-hashCode-tree.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ hexadecimal digits of its [`hashCode`][].
This hash serves as a unique identifier for that render object.
:::

[`hashCode`]: {{site.api}}/flutter/rendering/TextSelectionPoint/hashCode.html
[`hashCode`]: {{site.api}}flutter/rendering/TextSelectionPoint/hashCode.html
4 changes: 2 additions & 2 deletions src/_includes/docs/community/china/pub-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

1. Configure a proxy.
To configure a proxy, check out the
[Dart documentation on proxies]({{site.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).

配置代理。
要配置代理,请查阅 [Dart 关于代理的文档]({{site.dart-site}}/tools/pub/troubleshoot#pub-get-fails-from-behind-a-corporate-firewall)
要配置代理,请查阅 [Dart 关于代理的文档]({{site.dart-site}}tools/pub/troubleshoot#pub-get-fails-from-behind-a-corporate-firewall)

{% comment %}
From <https://github.com/flutter/website/issues/2556#issuecomment-481566476>
Expand Down
2 changes: 1 addition & 1 deletion src/_includes/docs/dart-tool-win.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ from the command line, or see the [dart tool][] page.

:::

[dart tool]: {{site.dart-site}}/tools/dart-tool
[dart tool]: {{site.dart-site}}tools/dart-tool
2 changes: 1 addition & 1 deletion src/_includes/docs/dart-tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ from the command line, or see the [dart tool][] page.

:::

[dart tool]: {{site.dart-site}}/tools/dart-tool
[dart tool]: {{site.dart-site}}tools/dart-tool
4 changes: 2 additions & 2 deletions src/_includes/docs/dartpad-troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

This codelab uses embedded DartPads to display examples and exercises.
If you see empty boxes instead of DartPads, check out
[Troubleshooting DartPad]({{site.dart-site}}/tools/dartpad/troubleshoot).
[Troubleshooting DartPad]({{site.dart-site}}tools/dartpad/troubleshoot).

本页面使用一个嵌入式版本的 DartPad 来显示示例和进行练习。
如果你看到的是空白内容,而不是 DartPad 内容,
请前往 [DartPad 故障排除页]({{site.dart-site}}/tools/dartpad/troubleshoot)
请前往 [DartPad 故障排除页]({{site.dart-site}}tools/dartpad/troubleshoot)

:::
2 changes: 1 addition & 1 deletion src/_includes/docs/debug/debug-flow-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ check out [`flutter_gdb`][].
:::

[GNU Project Debugger]: https://www.sourceware.org/gdb/
[`flutter_gdb`]: {{site.repo.engine}}/blob/main/sky/tools/flutter_gdb
[`flutter_gdb`]: {{site.repo.engine}}blob/main/sky/tools/flutter_gdb

#### Build the Android version of the Flutter app in the Terminal

Expand Down
4 changes: 2 additions & 2 deletions src/_includes/docs/install/deprecated/analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ how data is handled by these services.

[Google Terms of Service]: https://policies.google.com/terms
[Privacy Policy]: https://policies.google.com/privacy
[crash reports]: {{site.repo.flutter}}/wiki/Flutter-CLI-crash-reporting
[`dart` tool]: {{site.dart-site}}/tools/dart-tool
[crash reports]: {{site.repo.flutter}}wiki/Flutter-CLI-crash-reporting
[`dart` tool]: {{site.dart-site}}tools/dart-tool
:::
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ Flutter 需要完整安装 Android Studio 才能支持其 Android 平台的依

### 安装 Android Studio

1. Download and install [Android Studio]({{site.android-dev}}/studio/install#chrome-os).
1. Download and install [Android Studio]({{site.android-dev}}studio/install#chrome-os).

下载并安装 [Android Studio]({{site.android-dev}}/studio/install#chrome-os)
下载并安装 [Android Studio]({{site.android-dev}}studio/install#chrome-os)

1. Start Android Studio, and go through the 'Android Studio Setup Wizard'.
This installs the latest Android SDK, platform tools and build tooling
Expand Down Expand Up @@ -81,10 +81,10 @@ you need an Android device running Android 5.0 (API level 21) or higher.

1. Enable **Developer options** and **USB debugging** on your device.
Detailed instructions are available in the
[Android documentation]({{site.android-dev}}/studio/debug/dev-options).
[Android documentation]({{site.android-dev}}studio/debug/dev-options).

在你的设备上启动**开发者选项**以及 **USB 调试**工具。
详细步骤请查看 [Android 文档]({{site.android-dev}}/studio/debug/dev-options)
详细步骤请查看 [Android 文档]({{site.android-dev}}studio/debug/dev-options)

1. Using a USB cable, plug your phone into your computer.
On your Chromebook, you might see a notification for
Expand Down
28 changes: 14 additions & 14 deletions src/_includes/docs/install/deprecated/android-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ Flutter 依赖 Android Studio 的全量安装来为其提供 Android 平台的

{% render docs/help-link.md, location:'android-studio', section:'#android-setup' %}

1. Download and install [Android Studio]({{site.android-dev}}/studio).
1. Download and install [Android Studio]({{site.android-dev}}studio).

下载并安装 [Android Studio]({{site.android-dev}}/studio)
下载并安装 [Android Studio]({{site.android-dev}}studio)

1. Start Android Studio, and go through the 'Android Studio Setup Wizard'.
This installs the latest Android SDK, Android SDK Command-line Tools,
Expand Down Expand Up @@ -56,22 +56,22 @@ you need an Android device running Android 5.0 (API level 21) or higher.

1. Enable **Developer options** and **USB debugging** on your device.
Detailed instructions are available in the
[Android documentation]({{site.android-dev}}/studio/debug/dev-options).
[Android documentation]({{site.android-dev}}studio/debug/dev-options).

在设备上打开 **Developer options****USB debugging** 选项,
你可以在 [Android documentation]({{site.android-dev}}/studio/debug/dev-options) 上查看更详细的方法介绍。
你可以在 [Android documentation]({{site.android-dev}}studio/debug/dev-options) 上查看更详细的方法介绍。

1. [Optional] To leverage wireless debugging, enable **Wireless debugging**
on your device. Detailed instructions are available in the
[Android documentation]({{site.android-dev}}/studio/run/device#wireless).
[Android documentation]({{site.android-dev}}studio/run/device#wireless).

[可选] 要使用无线调试,启用设备上的 **Wireless debugging**
详细的操作步骤在 [Android 文档]({{site.android-dev}}/studio/run/device#wireless) 里有。
详细的操作步骤在 [Android 文档]({{site.android-dev}}studio/run/device#wireless) 里有。

1. Windows-only: Install the [Google USB
Driver]({{site.android-dev}}/studio/run/win-usb).
Driver]({{site.android-dev}}studio/run/win-usb).

如果是在 Windows 平台上使用,需要安装 [Google USB Driver]({{site.android-dev}}/studio/run/win-usb)
如果是在 Windows 平台上使用,需要安装 [Google USB Driver]({{site.android-dev}}studio/run/win-usb)

1. Using a USB cable, plug your phone into your computer. If prompted on your
device, authorize your computer to access your device.
Expand Down Expand Up @@ -103,11 +103,11 @@ follow these steps:
根据以下步骤来将 Flutter 应用运行或测试于你的 Android 模拟器上:

1. Enable
[VM acceleration]({{site.android-dev}}/studio/run/emulator-acceleration#accel-vm)
[VM acceleration]({{site.android-dev}}studio/run/emulator-acceleration#accel-vm)
on your machine.

激活机器上的
[VM acceleration]({{site.android-dev}}/studio/run/emulator-acceleration) 选项。
[VM acceleration]({{site.android-dev}}studio/run/emulator-acceleration) 选项。

1. Start **Android Studio**, click the **Device Manager**
icon, and select **Create Device** under **Virtual** tab...
Expand Down Expand Up @@ -145,20 +145,20 @@ follow these steps:

1. Under Emulated Performance, select **Hardware - GLES 2.0** to enable
[hardware
acceleration]({{site.android-dev}}/studio/run/emulator-acceleration).
acceleration]({{site.android-dev}}studio/run/emulator-acceleration).

在 Emulated Performance 下选择 **Hardware - GLES 2.0** 选项来开启
[硬件加速]({{site.android-dev}}/studio/run/emulator-acceleration)
[硬件加速]({{site.android-dev}}studio/run/emulator-acceleration)

1. Verify the AVD configuration is correct, and select **Finish**.

确保 AVD 选项配置正确,并选择 **Finish** 选项。

For details on the above steps, see [Managing
AVDs]({{site.android-dev}}/studio/run/managing-avds).
AVDs]({{site.android-dev}}studio/run/managing-avds).

想要查看上述步骤的更多详细信息,
请查看 [Managing AVDs]({{site.android-dev}}/studio/run/managing-avds) 页面。
请查看 [Managing AVDs]({{site.android-dev}}studio/run/managing-avds) 页面。

1. In Android Virtual Device Manager, click **Run** in the toolbar.
The emulator starts up and displays the default canvas for your
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ Now, run flutter doctor to accept the android-licenses:
$ flutter doctor --android-licenses
```

[Android SDK tools]: {{site.android-dev}}/studio/#downloads
[Android SDK tools]: {{site.android-dev}}studio/#downloads
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ you need the following in addition to the Flutter SDK:
[CocoaPods][] 如果你需要使用插件

[CocoaPods]: https://cocoapods.org/
[Xcode]: {{site.apple-dev}}/xcode/
[Xcode]: {{site.apple-dev}}xcode/
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

{{site.alert.end}}

[Announcing Flutter for Windows]: {{site.flutter-medium}}/announcing-flutter-for-windows-6979d0d01fed
[Announcing Flutter for Windows]: {{site.flutter-medium}}announcing-flutter-for-windows-6979d0d01fed

### Additional Windows requirements

Expand Down
10 changes: 5 additions & 5 deletions src/_includes/docs/install/devices/android-emulator.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ follow these steps to create and select an emulator.
请按照以下步骤创建并选择模拟器:

1. Enable
[VM acceleration]({{site.android-dev}}/studio/run/emulator-acceleration#accel-vm)
[VM acceleration]({{site.android-dev}}studio/run/emulator-acceleration#accel-vm)
on your development computer.

在你的开发电脑上启用 [VM acceleration]({{site.android-dev}}/studio/run/emulator-acceleration#accel-vm)
在你的开发电脑上启用 [VM acceleration]({{site.android-dev}}studio/run/emulator-acceleration#accel-vm)

1. Start **Android Studio**.

Expand Down Expand Up @@ -134,10 +134,10 @@ follow these steps to create and select an emulator.
请单击 **Finish**

To learn more about AVDs, check out
[Managing AVDs]({{site.android-dev}}/studio/run/managing-avds).
[Managing AVDs]({{site.android-dev}}studio/run/managing-avds).

想要了解更多有关 AVD 的信息,请查阅
[Managing AVDs]({{site.android-dev}}/studio/run/managing-avds)
[Managing AVDs]({{site.android-dev}}studio/run/managing-avds)

1. In the **Device Manager** dialog, click the **Run** icon to the right
of your desired AVD.
Expand All @@ -148,4 +148,4 @@ follow these steps to create and select an emulator.
单击所需 AVD 右侧的 **Run** 图标。
模拟器启动并显示所选 Android 操作系统的版本和设备默认的画布。

[hardware acceleration]: {{site.android-dev}}/studio/run/emulator-acceleration
[hardware acceleration]: {{site.android-dev}}studio/run/emulator-acceleration
12 changes: 6 additions & 6 deletions src/_includes/docs/install/devices/android-physical.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ you need an Android device running {{site.targetmin.android}} or later.

1. Enable **Developer options** and **USB debugging** on your device
as described in the
[Android documentation]({{site.android-dev}}/studio/debug/dev-options).
[Android documentation]({{site.android-dev}}studio/debug/dev-options).

按照 [Android 文档]({{site.android-dev}}/studio/debug/dev-options)
按照 [Android 文档]({{site.android-dev}}studio/debug/dev-options)
中的说明,
在设备上启用 **开发者选项****USB 调试**

1. [Optional] To leverage wireless debugging,
enable **Wireless debugging** on your device as described in the
[Android documentation]({{site.android-dev}}/studio/run/device#wireless).
[Android documentation]({{site.android-dev}}studio/run/device#wireless).

[可选] 如果要利用无线调试,
请按照 [Android 文档]({{site.android-dev}}/studio/run/device#wireless)
请按照 [Android 文档]({{site.android-dev}}studio/run/device#wireless)
中的说明在设备上启用 **无线调试**

{%- if include.devos == 'Windows' %}

1. Install the [Google USB Driver]({{site.android-dev}}/studio/run/win-usb).
1. Install the [Google USB Driver]({{site.android-dev}}studio/run/win-usb).

安装 [Google USB Driver]({{site.android-dev}}/studio/run/win-usb)
安装 [Google USB Driver]({{site.android-dev}}studio/run/win-usb)

{% endif %}

Expand Down
10 changes: 5 additions & 5 deletions src/_includes/docs/install/devices/ios-physical.md
Original file line number Diff line number Diff line change
Expand Up @@ -487,12 +487,12 @@ $ flutter run --device-timeout 60
:::

[Check the app's Bundle ID]: /assets/images/docs/setup/xcode-unique-bundle-id.png
[Choosing a Membership]: {{site.apple-dev}}/support/compare-memberships
[Choosing a Membership]: {{site.apple-dev}}support/compare-memberships
[Trust Mac]: /assets/images/docs/setup/trust-computer.png
[Xcode account add]: /assets/images/docs/setup/xcode-account.png
[Developer Mode]: {{site.apple-dev}}/documentation/xcode/enabling-developer-mode-on-a-device
[Apple's Developer Forums]: {{site.apple-dev}}/forums/
[Developer Mode]: {{site.apple-dev}}documentation/xcode/enabling-developer-mode-on-a-device
[Apple's Developer Forums]: {{site.apple-dev}}forums/
[Debugging your add-to-app module]: /add-to-app/debugging/#wireless-debugging
[Apple's documentation on pairing a wireless device with Xcode]: https://help.apple.com/xcode/mac/9.0/index.html?localePath=en.lproj#/devbc48d1bad
[Apple Developer]: {{site.apple-dev}}/programs/
[Apple Developer Account]: {{site.apple-dev}}/account
[Apple Developer]: {{site.apple-dev}}programs/
[Apple Developer Account]: {{site.apple-dev}}account
2 changes: 1 addition & 1 deletion src/_includes/docs/install/reqs/macos/apple-silicon.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ $ sudo softwareupdate --install-rosetta --agree-to-license

[Apple silicon]: https://support.apple.com/en-us/HT211814
[rosetta]: https://support.apple.com/en-us/HT211861
[need-rosetta]: {{site.repo.this}}/pull/7119#issuecomment-1124537969
[need-rosetta]: {{site.repo.this}}pull/7119#issuecomment-1124537969
2 changes: 1 addition & 1 deletion src/_includes/docs/install/reqs/macos/software.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ If you need to install `git`, type `brew install git`.

[Git]: https://formulae.brew.sh/formula/git
[Android Studio]: https://developer.android.com/studio/install#mac
[Xcode]: {{site.apple-dev}}/xcode/
[Xcode]: {{site.apple-dev}}xcode/
[CocoaPods]: https://cocoapods.org/
[Google Chrome]: https://www.google.com/chrome/dr/download/
2 changes: 1 addition & 1 deletion src/_includes/docs/install/reqs/macos/zsh-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@ in the macOS documentation.

</details>

[install-zsh]: https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH
[install-zsh]: {{site.github}}ohmyzsh/ohmyzsh/wiki/Installing-ZSH
[dscl]: https://ss64.com/mac/dscl.html
2 changes: 1 addition & 1 deletion src/_includes/docs/install/test-drive/androidstudio.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@ uses [Material Components][].
{% include docs/install/test-drive/try-hot-reload.md save_changes=save_changes ide="Android Studio" %}

[Main IntelliJ toolbar]: /assets/images/docs/tools/android-studio/main-toolbar.png
[Material Components]: {{site.material}}/components
[Material Components]: {{site.material}}components

</div>
2 changes: 1 addition & 1 deletion src/_includes/docs/install/test-drive/vscode.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@ hot reload at this time.

{% include docs/install/test-drive/try-hot-reload.md save_changes=save_changes ide="VS Code" %}

[Material Components]: {{site.material}}/components
[Material Components]: {{site.material}}components

</div>
Loading

0 comments on commit 36726aa

Please sign in to comment.