「双方向テキスト」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(→‎概念: 一部飜訳)
(TranslationStatu を更新)
 
(同じ利用者による、間の11版が非表示)
1行目: 1行目:
 
[[Category:インプットメソッド]]
 
[[Category:インプットメソッド]]
  +
[[en:Bidirectional text]]
 
[[Wikipedia:ja:双方向テキスト|双方向テキスト(そうほうこうテキスト、英: bi-directional text)]]とは、右から左(RTL)と左から右(LTR)の2つの方向性を持つテキストです。
 
[[Wikipedia:ja:双方向テキスト|双方向テキスト(そうほうこうテキスト、英: bi-directional text)]]とは、右から左(RTL)と左から右(LTR)の2つの方向性を持つテキストです。
   
6行目: 7行目:
 
; テキストの方向: テキスト編集では、テキストの方向を設定することで、テキストナビゲーション、テキスト選択、テキスト挿入の変更など、入力されたテキストとプログラムのやり取りが変更されます。
 
; テキストの方向: テキスト編集では、テキストの方向を設定することで、テキストナビゲーション、テキスト選択、テキスト挿入の変更など、入力されたテキストとプログラムのやり取りが変更されます。
 
;テキストアライメント: テキストアライメントは、テキストの表示方法とスタイルを変更するだけです。
 
;テキストアライメント: テキストアライメントは、テキストの表示方法とスタイルを変更するだけです。
  +
; フェイク Bidi: RTL 文脈を模倣して、完全に反転した英文を表示する偽ロケールです。これは、RTL 言語を話さない開発者が、RTL の問題に対処するのに役立ちます。例えば
; Fake Bidi: a fake locale displaying completely reversed English sentences to mimic a RTL context. This helps developers who do not speak a RTL language to deal with RTL issues. For example: {{bc|This English sentence contains SDROW CIBARA EMOS and ends with English words.}}
 
  +
: {{bc|This English sentence contains SDROW CIBARA EMOS and ends with English words.}}
; Poor man's bidi mode: automatic visual text order right-to-left input in normal terminal.
 
  +
; プアマンズ bidi モード: 通常の端末で視覚的な文字列を右から左へ自動入力するモード。
; Logical navigation: words are traversed as they are read.
 
  +
; 論理的なナビゲーション: 単語を読みながらトラバースされます。
; Visual navigation: words are traversed as they are displayed. [https://imgur.com/a/lfQV88E This GIF] demonstrates the difference between the two.
 
  +
; ビジュアルナビゲーション: 単語が表示されながらトラバースされます。[https://imgur.com/a/lfQV88E この GIF] は、この 2 つの違いを示しています。
   
  +
論理的なナビゲーションは、Bidi を完全にサポートするためにプログラムが実装すべき正しいナビゲーションの方法です。にもかかわらず、この 2 つの間のスイッチがあることが望ましいのです。
Logical navigation is the correct way of navigation that programs should implement to fully support Bidi. Despite that, it would be preferable to have a switch between the two.
 
; [[Wikipedia:Bidirectional_text#Unicode_bidi_support|Unicode support]]: there are three main Unicode control characters: [[Wikipedia:RLM]], [[Wikipedia:LRM]], [[Wikipedia:ALM]].
 
   
  +
; [[Wikipedia:Bidirectional_text#Unicode_bidi_support|Unicode support]]: Unicode 制御文字は主に 3 つあります。[[Wikipedia:RLM]]、[[Wikipedia:LRM]]、[[Wikipedia:ALM]] です。
; [https://www.unicode.org/reports/tr9/ Bidirectional Algorithm]: is the set of rules applied to display text in the correct order.
 
   
  +
; [https://www.unicode.org/reports/tr9/ 双方向アルゴリズム]: テキストを正しい順序で表示するために適用される規則の集合である。
{{AUR|fribidi-git}} is an open source implementations of Bidi Algorithm. {{AUR|python-bidi}} is a python library for related functions.
 
  +
  +
{{AUR|fribidi-git}} は Bidi アルゴリズムのオープンソース実装です。{AUR|python-bidi}} は関連する関数のための Python ライブラリです。
   
 
== サポート ==
 
== サポート ==
   
  +
プログラムが Bidi テキストを完全にサポートするためには、以下の機能を持っている必要があります。
In order for a program to fully support Bidi text, it must have:
 
   
; Letter rendering (RTL): able to correctly apply letter shaping and ligatures. See [[Wikipedia:Complex text layout|Complete Text Layout]]. This is often referred to shortly as RTL support.
+
; レターレンダリング (RTL): 文字の整形や合字を正しく適用することができる。[[Wikipedia:Complex text layout|Complete Text Layout]] を参照。これを略して RTL 対応と呼ぶことが多い。
; Switch text alignment (Bidi): E.g: Firefox {{ic|Ctrl+Shift+X}} shortcut.
+
; テキストアライメントを切り替える(Bidi): Firefox {{ic|Ctrl+Shift+X}} ショートカット。
  +
; 論理的なナビゲーション: RTL テキストでは、RTL テキストアライメントで、矢印キーは逆ナビゲーションが発生しないようにする必要があります。
; Logical navigation: in a RTL text, with RTL text alignment, arrow keys should not cause reversed navigation.
 
   
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
41行目: 44行目:
 
| {{No|1=https://bugs.chromium.org/p/chromium/issues/detail?id=1357401}}
 
| {{No|1=https://bugs.chromium.org/p/chromium/issues/detail?id=1357401}}
 
| {{Yes}}
 
| {{Yes}}
| Chromium is the engine of ElectronJS. Fixing this should resolve Electron Apps too.
+
| Chromium ElectronJS のエンジンです。これを修正することで、Electron Apps も解決するはずです。
 
|-
 
|-
 
| browser
 
| browser
81行目: 84行目:
 
| {{No|1=https://www.mail-archive.com/emacs-bidi@gnu.org/msg00582.html}}
 
| {{No|1=https://www.mail-archive.com/emacs-bidi@gnu.org/msg00582.html}}
 
|
 
|
| With [https://github.com/emacsmirror/bidi extension]
+
| [https://github.com/emacsmirror/bidi extension] を使用
 
|-
 
|-
 
| editor
 
| editor
97行目: 100行目:
 
| {{Yes}}
 
| {{Yes}}
 
| {{Yes}}
 
| {{Yes}}
| fully supported. Enabled using [https://help.libreoffice.org/Common/Languages_Using_Complex_Text_Layout Complex Text Layout] from settings.
+
| 完全対応しています。設定から [https://help.libreoffice.org/Common/Languages_Using_Complex_Text_Layout Complex Text Layout]で有効化します。
 
|-
 
|-
 
| editor
 
| editor
105行目: 108行目:
 
| {{No|1=https://github.com/neovim/neovim/issues/553}}
 
| {{No|1=https://github.com/neovim/neovim/issues/553}}
 
|
 
|
| see [https://neovim.io/doc/user/arabic.html :set arabic]
+
| [https://neovim.io/doc/user/arabic.html :set arabic] を参照
 
|-
 
|-
 
| editor
 
| editor
121行目: 124行目:
 
| {{No|1=https://github.com/vim/vim/issues/204}}
 
| {{No|1=https://github.com/vim/vim/issues/204}}
 
|
 
|
| see [https://vim-jp.org/vimdoc-en/arabic.html :set arabic]
+
| [https://vim-jp.org/vimdoc-en/arabic.html :set arabic] を参照
 
|-
 
|-
 
| other
 
| other
145行目: 148行目:
 
| {{Yes}}
 
| {{Yes}}
 
| {{-}}
 
| {{-}}
| Using LuaTeX or XeLaTeX with polyglossia
+
| LuaTeX または XeLaTeX with polyglossia を使用
 
|-
 
|-
 
| other
 
| other
175行目: 178行目:
 
|
 
|
 
| {{Yes}}
 
| {{Yes}}
  +
| {{No|1=https://gitlab.gnome.org/GNOME/gedit/-/issues/468}}
| {{No}}
 
 
|
 
|
| For Gedit <= 2.1, workaround by [https://github.com/behnam/gedit-bidiassist extension].
+
| Gedit <= 2.1 の場合、[https://github.com/behnam/gedit-bidiassist extension] で回避可能です。
 
|-
 
|-
 
| terminal
 
| terminal
209行目: 212行目:
 
| {{No}}
 
| {{No}}
 
|
 
|
  +
| Gnome、sakura、xfce4 などの libvte ベースのものを含む
| including libvte-based like Gnome, sakura, xfce4...
 
 
|-
 
|-
 
| terminal
 
| terminal
257行目: 260行目:
 
| {{No|1=https://github.com/tmux/tmux/issues/1936}}
 
| {{No|1=https://github.com/tmux/tmux/issues/1936}}
 
|
 
|
  +
| 修正されません
| won't fix
 
 
|-
 
|-
 
| terminal
 
| terminal
278行目: 281行目:
 
== トラブルシューティング ==
 
== トラブルシューティング ==
   
  +
まず、[[ロケール#トラブルシューティング|UTF-8 エンコーディング]]が適切に設定されていることを確認してください。あなたの言語に対応した[[フォント]]がインストールされていることを確認してください。[[:en:Localization/Arabic#Fonts|Arabic]]、[[フォント#ペルシア文字|ペルシア文字]]、[[フォント#ヘブライ文字|ヘブライ文字]] のように、あなたの言語に対応した[[フォント]]がインストールされていることを確認してください。一部の端末では、アラビア語やヘブライ語のテキストを正しく表示するために ({{AUR|bicon-git}}) が必要です。
Verify [[Locale#Troubleshooting|UTF-8 Encoding]] is properly configured first. Make sure you install the [[fonts]] corresponding to your language: [[Localization/Arabic#Fonts|Arabic]], [[Fonts#Persian|Persian]], [[Fonts#Hebrew|Hebrew]]. For some terminal, ({{AUR|bicon-git}}) is required to properly display Arabic and Hebrew text.
 
   
 
=== 一時的な回避策 ===
 
=== 一時的な回避策 ===
294行目: 297行目:
 
* [https://www.freedesktop.org/wiki/Specifications/bidi-spec/ freedesktop specification for Bidi support]: [https://terminal-wg.pages.freedesktop.org/bidi/ terminal].
 
* [https://www.freedesktop.org/wiki/Specifications/bidi-spec/ freedesktop specification for Bidi support]: [https://terminal-wg.pages.freedesktop.org/bidi/ terminal].
 
* [https://rtlstyling.com/posts/rtl-styling Comprehensive guide of RTL styling in HTML]
 
* [https://rtlstyling.com/posts/rtl-styling Comprehensive guide of RTL styling in HTML]
  +
  +
{{TranslationStatus|Bidirectional text|2023-04-05|774688}}

2023年4月5日 (水) 12:13時点における最新版

双方向テキスト(そうほうこうテキスト、英: bi-directional text)とは、右から左(RTL)と左から右(LTR)の2つの方向性を持つテキストです。

概念

テキストの方向
テキスト編集では、テキストの方向を設定することで、テキストナビゲーション、テキスト選択、テキスト挿入の変更など、入力されたテキストとプログラムのやり取りが変更されます。
テキストアライメント
テキストアライメントは、テキストの表示方法とスタイルを変更するだけです。
フェイク Bidi
RTL 文脈を模倣して、完全に反転した英文を表示する偽ロケールです。これは、RTL 言語を話さない開発者が、RTL の問題に対処するのに役立ちます。例えば
This English sentence contains SDROW CIBARA EMOS and ends with English words.
プアマンズ bidi モード
通常の端末で視覚的な文字列を右から左へ自動入力するモード。
論理的なナビゲーション
単語を読みながらトラバースされます。
ビジュアルナビゲーション
単語が表示されながらトラバースされます。この GIF は、この 2 つの違いを示しています。

論理的なナビゲーションは、Bidi を完全にサポートするためにプログラムが実装すべき正しいナビゲーションの方法です。にもかかわらず、この 2 つの間のスイッチがあることが望ましいのです。

Unicode support
Unicode 制御文字は主に 3 つあります。Wikipedia:RLMWikipedia:LRMWikipedia:ALM です。
双方向アルゴリズム
テキストを正しい順序で表示するために適用される規則の集合である。

fribidi-gitAUR は Bidi アルゴリズムのオープンソース実装です。{AUR|python-bidi}} は関連する関数のための Python ライブラリです。

サポート

プログラムが Bidi テキストを完全にサポートするためには、以下の機能を持っている必要があります。

レターレンダリング (RTL)
文字の整形や合字を正しく適用することができる。Complete Text Layout を参照。これを略して RTL 対応と呼ぶことが多い。
テキストアライメントを切り替える(Bidi)
例 Firefox Ctrl+Shift+X ショートカット。
論理的なナビゲーション
RTL テキストでは、RTL テキストアライメントで、矢印キーは逆ナビゲーションが発生しないようにする必要があります。
Tag App Date RTL Bidi Nav Notes
browser chromium 2022-08-28 Yes No Yes Chromium は ElectronJS のエンジンです。これを修正することで、Electron Apps も解決するはずです。
browser firefox 2022-09-01 Yes No No
browser qtwebbrowser 2022-11-01 Yes No
browser webkit 2022-11-01 Yes No
editor AbiWord 2007-12-06 Yes
editor emacs 2019-06-31 Yes No extension を使用
editor kate 2016-06-20 Yes No
editor LibreOffice Yes Yes Yes 完全対応しています。設定から Complex Text Layoutで有効化します。
editor neovim 2014-04-17 No No :set arabic を参照
editor texworks 2009-03-01 Yes No
editor vim 2015-08-19 No No :set arabic を参照
other groff 2005-12-02 No No
other Wikipedia:HTML Yes Yes Yes
other latex Yes Yes LuaTeX または XeLaTeX with polyglossia を使用
other wine 2002-04-21 Yes No
terminal alacritty 2017-07-15 No
terminal dvtm 2019-10-12 No
terminal gedit Yes No Gedit <= 2.1 の場合、extension で回避可能です。
terminal irssi 2019-10-12 No
terminal kitty 2019-11-01 No
terminal konsole Yes No
terminal libvte Yes No Gnome、sakura、xfce4 などの libvte ベースのものを含む
terminal mltermAUR Yes No
terminal neatvi-gitAUR 2019-07-04 No
terminal pymux 2019-10-12 No
terminal qterminal Yes No
terminal radare2 2015-02-03 No
terminal tmux 2019-10-12 No 修正されません
terminal wezterm 2021-05-11 No
terminal xstAUR 2018-10-26 No

トラブルシューティング

まず、UTF-8 エンコーディングが適切に設定されていることを確認してください。あなたの言語に対応したフォントがインストールされていることを確認してください。Arabicペルシア文字ヘブライ文字 のように、あなたの言語に対応したフォントがインストールされていることを確認してください。一部の端末では、アラビア語やヘブライ語のテキストを正しく表示するために (bicon-gitAUR) が必要です。

一時的な回避策

参照

内部リンク

外部リンク

翻訳ステータス: このページは en:Bidirectional text の翻訳バージョンです。最後の翻訳日は 2023-04-05 です。もし英語版に 変更 があれば、翻訳の同期を手伝うことができます。