-
Notifications
You must be signed in to change notification settings - Fork 808
i18n(ja): Japanese Texts for first 6 files in Plugins Section #3500
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
Open
J1-takai
wants to merge
3
commits into
tauri-apps:v2
Choose a base branch
from
J1-takai:plugins-1
base: v2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,036
−0
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,169 @@ | ||
| --- | ||
| title: Autostart(自動起動) | ||
| description: システム起動時にアプリを自動的に起動します。 | ||
| plugin: autostart | ||
| i18nReady: true | ||
| --- | ||
|
|
||
| import PluginLinks from '@components/PluginLinks.astro'; | ||
| import Compatibility from '@components/plugins/Compatibility.astro'; | ||
|
|
||
| import { Tabs, TabItem, Steps } from '@astrojs/starlight/components'; | ||
| import CommandTabs from '@components/CommandTabs.astro'; | ||
| import PluginPermissions from '@components/PluginPermissions.astro'; | ||
| import TranslationNote from '@components/i18n/TranslationNote.astro'; | ||
|
|
||
| <TranslationNote lang="ja"> | ||
|
|
||
| **Plugin 説明内容の英語表記部分について** Plugin 関連の各章は、「Astro Web フレームワーク」により原文データからページ内容の一部が自動生成されているため、英語表記のままの部分があります。 | ||
|
|
||
| </TranslationNote> | ||
|
|
||
| <PluginLinks plugin={frontmatter.plugin} /> | ||
|
|
||
| システム起動時にアプリを自動的に起動します。 | ||
|
|
||
| ## 対応プラットフォーム | ||
|
|
||
| <Compatibility plugin={frontmatter.plugin} /> | ||
|
|
||
| ## セットアップ | ||
|
|
||
| はじめに、「Autostart(自動起動)」プラグインをインストールしてください。 | ||
|
|
||
| <Tabs> | ||
| <TabItem label="自動"> | ||
|
|
||
| 自分のプロジェクトのパッケージ・マネージャーを使用して依存関係を追加します: | ||
|
|
||
| {' '} | ||
|
|
||
| <CommandTabs | ||
| npm="npm run tauri add autostart" | ||
| yarn="yarn run tauri add autostart" | ||
| pnpm="pnpm tauri add autostart" | ||
| deno="deno task tauri add autostart" | ||
| bun="bun tauri add autostart" | ||
| cargo="cargo tauri add autostart" | ||
| /> | ||
|
|
||
| </TabItem> | ||
| <TabItem label="手動"> | ||
| <Steps> | ||
|
|
||
| 1. `src-tauri` フォルダで次のコマンドを実行して、`Cargo.toml` 内のプロジェクトの依存関係にこのプラグインを追加します: | ||
|
|
||
| ```sh frame=none | ||
| cargo add tauri-plugin-autostart --target 'cfg(any(target_os = "macos", windows, target_os = "linux"))' | ||
| ``` | ||
|
|
||
| 2. 追加したプラグインを初期化するために `lib.rs` を修正します: | ||
|
|
||
| ```rust title="src-tauri/src/lib.rs" ins={5-6} | ||
| #[cfg_attr(mobile, tauri::mobile_entry_point)] | ||
| pub fn run() { | ||
| tauri::Builder::default() | ||
| .setup(|app| { | ||
| #[cfg(desktop)] | ||
| app.handle().plugin(tauri_plugin_autostart::init(tauri_plugin_autostart::MacosLauncher::LaunchAgent, Some(vec!["--flag1", "--flag2"]) /* アプリに渡す任意の数の引数 */)); | ||
| Ok(()) | ||
| }) | ||
| .run(tauri::generate_context!()) | ||
| .expect("error while running tauri application"); | ||
| } | ||
| ``` | ||
|
|
||
| 3. お好みの JavaScript パッケージ・マネージャーを使用して、「JavaScript Guest」バインディングをインストールします: | ||
|
|
||
| <CommandTabs | ||
| npm="npm install @tauri-apps/plugin-autostart" | ||
| yarn="yarn add @tauri-apps/plugin-autostart" | ||
| pnpm="pnpm add @tauri-apps/plugin-autostart" | ||
| deno="deno add npm:@tauri-apps/plugin-autostart" | ||
| bun="bun add @tauri-apps/plugin-autostart" | ||
| /> | ||
|
|
||
| </Steps> | ||
| </TabItem> | ||
|
|
||
| </Tabs> | ||
|
|
||
| ## 使用法 | ||
|
|
||
| 「Autostart(自動起動)」プラグインは、JavaScript と Rust の両方で利用できます。 | ||
|
|
||
| <Tabs syncKey="lang"> | ||
| <TabItem label="JavaScript"> | ||
|
|
||
| ```javascript | ||
| import { enable, isEnabled, disable } from '@tauri-apps/plugin-autostart'; | ||
| // `"withGlobalTauri": true` を使用する場合は、 | ||
| // const { enable, isEnabled, disable } = window.__TAURI__.autostart; を使用できます; | ||
|
|
||
| // autostart を有効化 | ||
| await enable(); | ||
| // 有効化状態を確認 | ||
| console.log(`registered for autostart? ${await isEnabled()}`); | ||
| // autostart を無効化 | ||
| disable(); | ||
| ``` | ||
|
|
||
| </TabItem> | ||
| <TabItem label="Rust"> | ||
|
|
||
| ```rust | ||
| #[cfg_attr(mobile, tauri::mobile_entry_point)] | ||
| pub fn run() { | ||
| tauri::Builder::default() | ||
| .setup(|app| { | ||
| #[cfg(desktop)] | ||
| { | ||
| use tauri_plugin_autostart::MacosLauncher; | ||
| use tauri_plugin_autostart::ManagerExt; | ||
|
|
||
| app.handle().plugin(tauri_plugin_autostart::init( | ||
| MacosLauncher::LaunchAgent, | ||
| Some(vec!["--flag1", "--flag2"]), | ||
| )); | ||
|
|
||
| // 「autostart マネージャー」を入手 | ||
| let autostart_manager = app.autolaunch(); | ||
| // autostart を有効化 | ||
| let _ = autostart_manager.enable(); | ||
| // 有効化状態を確認 | ||
| println!("registered for autostart? {}", autostart_manager.is_enabled().unwrap()); | ||
| // autostart を無効化 | ||
| let _ = autostart_manager.disable(); | ||
| } | ||
| Ok(()) | ||
| }) | ||
| .run(tauri::generate_context!()) | ||
| .expect("error while running tauri application"); | ||
| } | ||
| ``` | ||
|
|
||
| </TabItem> | ||
| </Tabs> | ||
|
|
||
| ## アクセス権の設定 | ||
|
|
||
| デフォルトでは、潜在的に危険なプラグイン・コマンドとそのスコープ(有効範囲)はすべてブロックされており、アクセスできません。これらを有効にするには、`capabilities` 設定でアクセス権限を変更する必要があります。 | ||
|
|
||
| 詳細については「[セキュリティ・レベル Capabilities](/ja/security/capabilities/)」の章を参照してください。また、プラグインのアクセス権限を設定するには「[プライグン・アクセス権の使用](/ja/learn/security/using-plugin-permissions/)」の章のステップ・バイ・ステップ・ガイドを参照してください。 | ||
|
|
||
| ```json title="src-tauri/capabilities/default.json" | ||
| { | ||
| "permissions": [ | ||
| ..., | ||
| "autostart:allow-enable", | ||
| "autostart:allow-disable", | ||
| "autostart:allow-is-enabled" | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| <PluginPermissions plugin={frontmatter.plugin} /> | ||
|
|
||
| <div style="text-align: right;"> | ||
| 【※ この日本語版は、「Feb 22, 2025 英語版」に基づいています】 | ||
| </div> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,149 @@ | ||
| --- | ||
| title: Barcode Scanner(バーコード・スキャナー) | ||
| description: モバイル・アプリでカメラを使用し、QR コード、EAN-13、その他のバーコードをスキャン可能にします。 | ||
| plugin: barcode-scanner | ||
| i18nReady: true | ||
| --- | ||
|
|
||
| import PluginLinks from '@components/PluginLinks.astro'; | ||
| import Compatibility from '@components/plugins/Compatibility.astro'; | ||
|
|
||
| import { Tabs, TabItem, Steps } from '@astrojs/starlight/components'; | ||
| import CommandTabs from '@components/CommandTabs.astro'; | ||
| import PluginPermissions from '@components/PluginPermissions.astro'; | ||
| import TranslationNote from '@components/i18n/TranslationNote.astro'; | ||
|
|
||
| <TranslationNote lang="ja"> | ||
|
|
||
| **Plugin 説明内容の英語表記部分について** Plugin 関連の各章は、「Astro Web フレームワーク」により原文データからページ内容の一部が自動生成されているため、英語表記のままの部分があります。 | ||
|
|
||
| </TranslationNote> | ||
|
|
||
| <PluginLinks plugin={frontmatter.plugin} /> | ||
|
|
||
| モバイル・アプリでカメラを使用し、QR コード、EAN-13、その他のバーコードをスキャン可能にします。 | ||
|
|
||
| <TranslationNote lang="ja"> | ||
|
|
||
| **EAN-13** European Article Number: 商品識別コード/バーコード規格のひとつで、13 桁の「欧州商品番号」の意味。日本で最も普及している商品識別コードである「JAN コード」と同等のもの。《[Wikipedia](https://ja.wikipedia.org/wiki/EANコード)》 | ||
|
|
||
| </TranslationNote> | ||
|
|
||
| ## 対応プラットフォーム | ||
|
|
||
| <Compatibility plugin={frontmatter.plugin} /> | ||
|
|
||
| ## セットアップ | ||
|
|
||
| はじめに、「Barcode Scanner(バーコード・スキャナー)」プラグインをインストールしてください。 | ||
|
|
||
| <Tabs> | ||
| <TabItem label="自動"> | ||
|
|
||
| 自分のプロジェクトのパッケージ・マネージャーを使用して依存関係を追加します: | ||
|
|
||
| {' '} | ||
|
|
||
| <CommandTabs | ||
| npm="npm run tauri add barcode-scanner" | ||
| yarn="yarn run tauri add barcode-scanner" | ||
| pnpm="pnpm tauri add barcode-scanner" | ||
| deno="deno task tauri add barcode-scanner" | ||
| bun="bun tauri add barcode-scanner" | ||
| cargo="cargo tauri add barcode-scanner" | ||
| /> | ||
|
|
||
| </TabItem> | ||
| <TabItem label="手動"> | ||
| <Steps> | ||
|
|
||
| 1. `src-tauri` フォルダで次のコマンドを実行して、`Cargo.toml` 内のプロジェクトの依存関係にこのプラグインを追加します: | ||
|
|
||
| ```sh frame=none | ||
| cargo add tauri-plugin-barcode-scanner --target 'cfg(any(target_os = "android", target_os = "ios"))' | ||
| ``` | ||
|
|
||
| 2. 追加したプラグインを初期化するために `lib.rs` を修正します: | ||
|
|
||
| ```rust title="src-tauri/src/lib.rs" ins={5-6} | ||
| #[cfg_attr(mobile, tauri::mobile_entry_point)] | ||
| pub fn run() { | ||
| tauri::Builder::default() | ||
| .setup(|app| { | ||
| #[cfg(mobile)] | ||
| app.handle().plugin(tauri_plugin_barcode_scanner::init()); | ||
| Ok(()) | ||
| }) | ||
| .run(tauri::generate_context!()) | ||
| .expect("error while running tauri application"); | ||
| } | ||
| ``` | ||
|
|
||
| 3. お好みの JavaScript パッケージ・マネージャーを使用して、「JavaScript Guest」バインディングをインストールします: | ||
|
|
||
| <CommandTabs | ||
| npm="npm install @tauri-apps/plugin-barcode-scanner" | ||
| yarn="yarn add @tauri-apps/plugin-barcode-scanner" | ||
| pnpm="pnpm add @tauri-apps/plugin-barcode-scanner" | ||
| deno="deno add npm:@tauri-apps/plugin-barcode-scanner" | ||
| bun="bun add @tauri-apps/plugin-barcode-scanner" | ||
| /> | ||
|
|
||
| </Steps> | ||
|
|
||
| </TabItem> | ||
| </Tabs> | ||
|
|
||
| ## 設定 | ||
|
|
||
| iOS では、「Barcode Scanner」プラグインに、あなたのアプリがカメラを使用する理由を説明する `NSCameraUsageDescription` 情報プロパティ・リストの値が必要です。 | ||
|
|
||
| `src-tauri/Info.ios.plist` ファイルには、以下のスニペット(内容)を追加してください。 | ||
|
|
||
| ```xml title=src-tauri/Info.ios.plist | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| <plist version="1.0"> | ||
| <dict> | ||
| <key>NSCameraUsageDescription</key> | ||
| <string>Read QR codes</string> | ||
| </dict> | ||
| </plist> | ||
| ``` | ||
|
|
||
| ## 使用法 | ||
|
|
||
| 「Barcode Scanner」プラグインは JavaScript で利用できます。 | ||
|
|
||
| ```javascript | ||
| import { scan, Format } from '@tauri-apps/plugin-barcode-scanner'; | ||
| // `"withGlobalTauri": true` を使用する場合は、 | ||
| // const { scan, Format } = window.__TAURI__.barcodeScanner; を使用できます; | ||
|
|
||
| // `windowed: true` は、カメラ用に別のビューを開くのではなく、 | ||
| // 実際には Webview を透明に設定します | ||
| // 要素の透明化により下にあるものが表示されるように、ユーザーインターフェースを設定しておいてください | ||
| scan({ windowed: true, formats: [Format.QRCode] }); | ||
| ``` | ||
|
|
||
| ## アクセス権の設定 | ||
|
|
||
| デフォルトでは、潜在的に危険なプラグイン・コマンドとそのスコープ(有効範囲)はすべてブロックされており、アクセスできません。これらを有効にするには、`capabilities` 設定でアクセス権限を変更する必要があります。 | ||
|
|
||
| 詳細については「[セキュリティ・レベル Capabilities](/ja/security/capabilities/)」の章を参照してください。また、プラグインのアクセス権限を設定するには「[プライグン・アクセス権の使用](/ja/learn/security/using-plugin-permissions/)」の章のステップ・バイ・ステップ・ガイドを参照してください。 | ||
|
|
||
| ```json title="src-tauri/capabilities/mobile.json" | ||
| { | ||
| "$schema": "../gen/schemas/mobile-schema.json", | ||
| "identifier": "mobile-capability", | ||
| "windows": ["main"], | ||
| "platforms": ["iOS", "android"], | ||
| "permissions": ["barcode-scanner:allow-scan", "barcode-scanner:allow-cancel"] | ||
| } | ||
| ``` | ||
|
|
||
| <PluginPermissions plugin={frontmatter.plugin} /> | ||
|
|
||
| <div style="text-align: right;"> | ||
| 【※ この日本語版は、「Jul 1, 2025 英語版」に基づいています】 | ||
| </div> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
lets reword these notes, no need to mention Astro as it is the tool we use, its not 'their fault'. Overall this is correct
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.
@vasfvitor
Thank you for your comment. I have no intention to "blame" ASTRO for the remaining EN texts, and agree with you that there is no need to mention Astro as I just want to pre-notify JA readers that some parts of the plugin docs remain untranslated due to the auto-generated from the EN pages.
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.
My rephrased texts are as follows:
Plugin 説明内容の英語表記部分について Plugin の各章は、原文データからページ内容の一部が自動生成されているため、英語表記のままの部分があります。
which means something like:
Note on Remaining EN texts on Plugin Docs Each chapter of Plugin Docs has untranslated EN texts because they are auto-generated/extracted from the original EN documents.
Removed Words:
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.
This Pre-Notice will be shown in every Plugin Docs, because the readers check them as needed basis instead of reading through from the top one to the last one.
And, sorry to say that I have issued 12 docs with the old texts in two PRs #3500 and #3546. I will use the above re-worded phrase for the new docs to be translated.
Thank you always for your careful checks on my JA translations not only this but other PRs. 🙇