mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Move text orientation menu items into "writing direction" (close #759)
This commit is contained in:
parent
c3dd8799ae
commit
19c0673b31
@ -33,6 +33,7 @@ develop
|
||||
- Scroll console view after getting a new message to make it visible.
|
||||
- Display sharing window within the target document window.
|
||||
- Swap position of “View” with “Format” menu to conform to the Apple's Human Interface Guidelines.
|
||||
- Move the menu item changing the text orientation into Format > Writing Direction.
|
||||
- Display full encoding name in the status bar instead of the IANA charset name.
|
||||
- Add tooltips to the Unicode normalization forms in Text menu.
|
||||
- Append “Option-Command-T” shortcut to “Show/Hide Toolbar” menu item.
|
||||
|
@ -484,22 +484,36 @@ Gw
|
||||
<menuItem isSeparatorItem="YES" id="397">
|
||||
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
|
||||
</menuItem>
|
||||
<menuItem title="Wrap Lines" id="286">
|
||||
<connections>
|
||||
<action selector="toggleLineWrap:" target="Ady-hI-5gd" id="6Yy-Bp-Aq9"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Writing Direction" id="mEh-BD-ZlV">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Writing Direction" id="hxr-2A-KYT">
|
||||
<items>
|
||||
<menuItem title="Left to Right" state="on" id="7pw-5S-ekC">
|
||||
<menuItem title="Orientation" enabled="NO" id="6eV-nI-heo">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
<menuItem title="Horizontal" state="on" indentationLevel="1" id="jQ7-hG-AjA">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeLayoutOrientationHorizontal:" target="Ady-hI-5gd" id="WVo-ax-oWO"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Vertical" indentationLevel="1" id="bTd-nG-jjc">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeLayoutOrientationVertical:" target="Ady-hI-5gd" id="540-j1-Xm4"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="GcI-ed-8Zi"/>
|
||||
<menuItem title="Direction" enabled="NO" id="ICu-yD-nVi">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
<menuItem title="Left to Right" state="on" indentationLevel="1" id="7pw-5S-ekC">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeWritingDirectionLeftToRight:" target="Ady-hI-5gd" id="fgd-0N-MoV"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Right to Left" id="clG-Ph-Iyz">
|
||||
<menuItem title="Right to Left" indentationLevel="1" id="clG-Ph-Iyz">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeWritingDirectionRightToLeft:" target="Ady-hI-5gd" id="a1M-Oj-Kf6"/>
|
||||
@ -508,10 +522,9 @@ Gw
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Use Vertical Orientation" id="bTd-nG-jjc">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menuItem title="Wrap Lines" id="286">
|
||||
<connections>
|
||||
<action selector="toggleLayoutOrientation:" target="Ady-hI-5gd" id="WAe-DI-LSN"/>
|
||||
<action selector="toggleLineWrap:" target="Ady-hI-5gd" id="6Yy-Bp-Aq9"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
|
@ -178,10 +178,6 @@ final class DocumentViewController: NSSplitViewController, SyntaxStyleDelegate,
|
||||
let title = self.wrapsLines ? "Unwrap Lines" : "Wrap Lines"
|
||||
menuItem.title = NSLocalizedString(title, comment: "")
|
||||
|
||||
case #selector(toggleLayoutOrientation):
|
||||
let title = self.verticalLayoutOrientation ? "Use Horizontal Orientation" : "Use Vertical Orientation"
|
||||
menuItem.title = NSLocalizedString(title, comment: "")
|
||||
|
||||
case #selector(togglePageGuide):
|
||||
let title = self.showsPageGuide ? "Hide Page Guide" : "Show Page Guide"
|
||||
menuItem.title = NSLocalizedString(title, comment: "")
|
||||
@ -200,6 +196,11 @@ final class DocumentViewController: NSSplitViewController, SyntaxStyleDelegate,
|
||||
case #selector(toggleAutoTabExpand):
|
||||
menuItem.state = self.isAutoTabExpandEnabled ? .on : .off
|
||||
|
||||
case #selector(makeLayoutOrientationHorizontal):
|
||||
menuItem.state = self.verticalLayoutOrientation ? .off : .on
|
||||
|
||||
case #selector(makeLayoutOrientationVertical):
|
||||
menuItem.state = self.verticalLayoutOrientation ? .on : .off
|
||||
|
||||
case #selector(makeWritingDirectionLeftToRight):
|
||||
menuItem.state = (self.writingDirection == .leftToRight) ? .on : .off
|
||||
@ -566,6 +567,20 @@ final class DocumentViewController: NSSplitViewController, SyntaxStyleDelegate,
|
||||
}
|
||||
|
||||
|
||||
/// make text layout orientation horizontal
|
||||
@IBAction func makeLayoutOrientationHorizontal(_ sender: Any?) {
|
||||
|
||||
self.verticalLayoutOrientation = false
|
||||
}
|
||||
|
||||
|
||||
/// make text layout orientation vertical
|
||||
@IBAction func makeLayoutOrientationVertical(_ sender: Any?) {
|
||||
|
||||
self.verticalLayoutOrientation = true
|
||||
}
|
||||
|
||||
|
||||
/// make entire writing direction LTR
|
||||
@IBAction func makeWritingDirectionLeftToRight(_ sender: Any?) {
|
||||
|
||||
|
@ -266,8 +266,6 @@
|
||||
"Show Page Guide" = "Seitenhilfslinie einblenden";
|
||||
"Unwrap Lines" = "Zeilen nicht umbrechen";
|
||||
"Wrap Lines" = "Zeilen umbrechen";
|
||||
"Use Vertical Orientation" = "Layout vertikal ausrichten";
|
||||
"Use Horizontal Orientation" = "Layout horizontal ausrichten";
|
||||
|
||||
// Tooltip for "Show Invisible Characters" menu item
|
||||
"Show or hide invisible characters in document" = "Unsichtbare Zeichen im Text ein-/ausblenden";
|
||||
|
@ -240,26 +240,31 @@
|
||||
/* Class = "NSMenuItem"; title = "Show Invisible Characters"; ObjectID = "788"; */
|
||||
"788.title" = "Unsichtbare Zeichen einblenden";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Wrap Lines"; ObjectID = "286"; */
|
||||
"286.title" = "Zeilen umbrechen";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Writing Direction"; ObjectID = "mEh-BD-ZlV"; */
|
||||
"mEh-BD-ZlV.title" = "Richtung beim Schreiben";
|
||||
/* Class = "NSMenu"; title = "Writing Direction"; ObjectID = "hxr-2A-KYT"; */
|
||||
"hxr-2A-KYT.title" = "Richtung beim Schreiben";
|
||||
/* Class = "NSMenuItem"; title = "Orientation"; ObjectID = "6eV-nI-heo"; */
|
||||
"6eV-nI-heo.title" = "Orientierung";
|
||||
/* Class = "NSMenuItem"; title = "Horizontal"; ObjectID = "jQ7-hG-AjA"; */
|
||||
"jQ7-hG-AjA.title" = "Horizontal";
|
||||
/* Class = "NSMenuItem"; title = "Vertical"; ObjectID = "bTd-nG-jjc"; */
|
||||
"bTd-nG-jjc.title" = "Vertikal";
|
||||
/* Class = "NSMenuItem"; title = "Direction"; ObjectID = "ICu-yD-nVi"; */
|
||||
"ICu-yD-nVi.title" = "Richtung";
|
||||
/* Class = "NSMenuItem"; title = "Left to Right"; ObjectID = "7pw-5S-ekC"; */
|
||||
"7pw-5S-ekC.title" = "Von links nach rechts";
|
||||
/* Class = "NSMenuItem"; title = "Right to Left"; ObjectID = "clG-Ph-Iyz"; */
|
||||
"clG-Ph-Iyz.title" = "Von rechts nach links";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Use Vertical Orientation"; ObjectID = "bTd-nG-jjc"; */
|
||||
"bTd-nG-jjc.title" = "Vertikal Orientierung verwenden";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Theme"; ObjectID = "8z7-Jc-agP"; */
|
||||
"8z7-Jc-agP.title" = "Thema";
|
||||
/* Class = "NSMenu"; title = "Theme"; ObjectID = "165-HJ-Xty"; */
|
||||
"165-HJ-Xty.title" = "Thema";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Wrap Lines"; ObjectID = "286"; */
|
||||
"286.title" = "Zeilen umbrechen";
|
||||
|
||||
|
||||
|
||||
// MARK: View
|
||||
|
@ -267,8 +267,6 @@
|
||||
"Show Page Guide" = "Mostra guida pagina";
|
||||
"Unwrap Lines" = "Rimuovi a capo automatico";
|
||||
"Wrap Lines" = "A capo automatico";
|
||||
"Use Vertical Orientation" = "Usa orientamento verticale";
|
||||
"Use Horizontal Orientation" = "Usa orientamento orizzontale";
|
||||
|
||||
// Tooltip for "Show Invisible Characters" menu item
|
||||
"Show or hide invisible characters in document" = "Mostra o nascondi i caratteri invisibili nel documento";
|
||||
|
@ -241,20 +241,25 @@
|
||||
/* Class = "NSMenuItem"; title = "Show Invisible Characters"; ObjectID = "788"; */
|
||||
"788.title" = "Mostra caratteri invisibili";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Wrap Lines"; ObjectID = "286"; */
|
||||
"286.title" = "A capo automatico";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Writing Direction"; ObjectID = "mEh-BD-ZlV"; */
|
||||
"mEh-BD-ZlV.title" = "Direzione scrittura";
|
||||
/* Class = "NSMenu"; title = "Writing Direction"; ObjectID = "hxr-2A-KYT"; */
|
||||
"hxr-2A-KYT.title" = "Direzione scrittura";
|
||||
/* Class = "NSMenuItem"; title = "Orientation"; ObjectID = "6eV-nI-heo"; */
|
||||
"6eV-nI-heo.title" = "Orientation"; // FIXME: added
|
||||
/* Class = "NSMenuItem"; title = "Horizontal"; ObjectID = "jQ7-hG-AjA"; */
|
||||
"jQ7-hG-AjA.title" = "Horizontal"; // FIXME: added
|
||||
/* Class = "NSMenuItem"; title = "Vertical"; ObjectID = "bTd-nG-jjc"; */
|
||||
"bTd-nG-jjc.title" = "Vertical"; // FIXME: added
|
||||
/* Class = "NSMenuItem"; title = "Direction"; ObjectID = "ICu-yD-nVi"; */
|
||||
"ICu-yD-nVi.title" = "Direction"; // FIXME: added
|
||||
/* Class = "NSMenuItem"; title = "Left to Right"; ObjectID = "7pw-5S-ekC"; */
|
||||
"7pw-5S-ekC.title" = "Da sinistra a destra";
|
||||
/* Class = "NSMenuItem"; title = "Right to Left"; ObjectID = "clG-Ph-Iyz"; */
|
||||
"clG-Ph-Iyz.title" = "Da destra a sinistra";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Use Vertical Orientation"; ObjectID = "bTd-nG-jjc"; */
|
||||
"bTd-nG-jjc.title" = "Usa orientamento verticale";
|
||||
/* Class = "NSMenuItem"; title = "Wrap Lines"; ObjectID = "286"; */
|
||||
"286.title" = "A capo automatico";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Theme"; ObjectID = "8z7-Jc-agP"; */
|
||||
"8z7-Jc-agP.title" = "Tema";
|
||||
|
@ -267,8 +267,6 @@
|
||||
"Show Page Guide" = "ページガイドを表示";
|
||||
"Unwrap Lines" = "行を折り返さない";
|
||||
"Wrap Lines" = "行を折り返す";
|
||||
"Use Vertical Orientation" = "縦書きで表示";
|
||||
"Use Horizontal Orientation" = "横書きで表示";
|
||||
|
||||
// Tooltip for "Show Invisible Characters" menu item
|
||||
"Show or hide invisible characters in document" = "書類中の不可視文字を表示/非表示";
|
||||
|
@ -240,20 +240,25 @@
|
||||
/* Class = "NSMenuItem"; title = "Show Invisible Characters"; ObjectID = "788"; */
|
||||
"788.title" = "不可視文字を表示";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Wrap Lines"; ObjectID = "286"; */
|
||||
"286.title" = "行を折り返す";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Writing Direction"; ObjectID = "mEh-BD-ZlV"; */
|
||||
"mEh-BD-ZlV.title" = "文章の方向";
|
||||
/* Class = "NSMenu"; title = "Writing Direction"; ObjectID = "hxr-2A-KYT"; */
|
||||
"hxr-2A-KYT.title" = "文章の方向";
|
||||
/* Class = "NSMenuItem"; title = "Orientation"; ObjectID = "6eV-nI-heo"; */
|
||||
"6eV-nI-heo.title" = "向き";
|
||||
/* Class = "NSMenuItem"; title = "Horizontal"; ObjectID = "jQ7-hG-AjA"; */
|
||||
"jQ7-hG-AjA.title" = "縦書き";
|
||||
/* Class = "NSMenuItem"; title = "Vertical"; ObjectID = "bTd-nG-jjc"; */
|
||||
"bTd-nG-jjc.title" = "縦書き";
|
||||
/* Class = "NSMenuItem"; title = "Direction"; ObjectID = "ICu-yD-nVi"; */
|
||||
"ICu-yD-nVi.title" = "方向";
|
||||
/* Class = "NSMenuItem"; title = "Left to Right"; ObjectID = "7pw-5S-ekC"; */
|
||||
"7pw-5S-ekC.title" = "左から右";
|
||||
/* Class = "NSMenuItem"; title = "Right to Left"; ObjectID = "clG-Ph-Iyz"; */
|
||||
"clG-Ph-Iyz.title" = "右から左";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Use Vertical Orientation"; ObjectID = "bTd-nG-jjc"; */
|
||||
"bTd-nG-jjc.title" = "縦書きに変更";
|
||||
/* Class = "NSMenuItem"; title = "Wrap Lines"; ObjectID = "286"; */
|
||||
"286.title" = "行を折り返す";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Theme"; ObjectID = "8z7-Jc-agP"; */
|
||||
"8z7-Jc-agP.title" = "テーマ";
|
||||
|
@ -267,8 +267,6 @@
|
||||
"Show Page Guide" = "Mostrar Guia da Página";
|
||||
"Unwrap Lines" = "Desajustar Linhas";
|
||||
"Wrap Lines" = "Ajustar Linhas";
|
||||
"Use Vertical Orientation" = "Usar Orientação Vertical";
|
||||
"Use Horizontal Orientation" = "Use Orientação Horizontal";
|
||||
|
||||
// Tooltip for "Show Invisible Characters" menu item
|
||||
"Show or hide invisible characters in document" = "Mostre ou oculte os caracteres invisíveis no documento";
|
||||
|
@ -239,20 +239,25 @@
|
||||
/* Class = "NSMenuItem"; title = "Show Invisible Characters"; ObjectID = "788"; */
|
||||
"788.title" = "Mostrar Caracteres Invisíveis";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Wrap Lines"; ObjectID = "286"; */
|
||||
"286.title" = "Ajustar Linhas";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Writing Direction"; ObjectID = "mEh-BD-ZlV"; */
|
||||
"mEh-BD-ZlV.title" = "Direção de escrita";
|
||||
/* Class = "NSMenu"; title = "Writing Direction"; ObjectID = "hxr-2A-KYT"; */
|
||||
"hxr-2A-KYT.title" = "Direção de escrita";
|
||||
/* Class = "NSMenuItem"; title = "Orientation"; ObjectID = "6eV-nI-heo"; */
|
||||
"6eV-nI-heo.title" = "Orientation"; // FIXME: added
|
||||
/* Class = "NSMenuItem"; title = "Horizontal"; ObjectID = "jQ7-hG-AjA"; */
|
||||
"jQ7-hG-AjA.title" = "Horizontal"; // FIXME: added
|
||||
/* Class = "NSMenuItem"; title = "Vertical"; ObjectID = "bTd-nG-jjc"; */
|
||||
"bTd-nG-jjc.title" = "Vertical"; // FIXME: added
|
||||
/* Class = "NSMenuItem"; title = "Direction"; ObjectID = "ICu-yD-nVi"; */
|
||||
"ICu-yD-nVi.title" = "Direction"; // FIXME: added
|
||||
/* Class = "NSMenuItem"; title = "Left to Right"; ObjectID = "7pw-5S-ekC"; */
|
||||
"7pw-5S-ekC.title" = "Da esquerda para a direita";
|
||||
/* Class = "NSMenuItem"; title = "Right to Left"; ObjectID = "clG-Ph-Iyz"; */
|
||||
"clG-Ph-Iyz.title" = "Da direita para a esquerda";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Use Vertical Orientation"; ObjectID = "bTd-nG-jjc"; */
|
||||
"bTd-nG-jjc.title" = "Usar Orientação Vertical";
|
||||
/* Class = "NSMenuItem"; title = "Wrap Lines"; ObjectID = "286"; */
|
||||
"286.title" = "Ajustar Linhas";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Theme"; ObjectID = "8z7-Jc-agP"; */
|
||||
"8z7-Jc-agP.title" = "Tema";
|
||||
|
@ -267,8 +267,6 @@
|
||||
"Show Page Guide" = "显示页面指示";
|
||||
"Unwrap Lines" = "不换行";
|
||||
"Wrap Lines" = "换行";
|
||||
"Use Vertical Orientation" = "纵向显示";
|
||||
"Use Horizontal Orientation" = "横向显示";
|
||||
|
||||
// Tooltip for "Show Invisible Characters" menu item
|
||||
"Show or hide invisible characters in document" = "显示或隐藏文档中的不可见字符";
|
||||
|
@ -242,20 +242,25 @@
|
||||
/* Class = "NSMenuItem"; title = "Show Invisible Characters"; ObjectID = "788"; */
|
||||
"788.title" = "显示不可见字符";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Wrap Lines"; ObjectID = "286"; */
|
||||
"286.title" = "换行";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Writing Direction"; ObjectID = "mEh-BD-ZlV"; */
|
||||
"mEh-BD-ZlV.title" = "书写方向";
|
||||
/* Class = "NSMenu"; title = "Writing Direction"; ObjectID = "hxr-2A-KYT"; */
|
||||
"hxr-2A-KYT.title" = "书写方向";
|
||||
/* Class = "NSMenuItem"; title = "Orientation"; ObjectID = "6eV-nI-heo"; */
|
||||
"6eV-nI-heo.title" = "Orientation"; // FIXME: added
|
||||
/* Class = "NSMenuItem"; title = "Horizontal"; ObjectID = "jQ7-hG-AjA"; */
|
||||
"jQ7-hG-AjA.title" = "Horizontal"; // FIXME: added
|
||||
/* Class = "NSMenuItem"; title = "Vertical"; ObjectID = "bTd-nG-jjc"; */
|
||||
"bTd-nG-jjc.title" = "Vertical"; // FIXME: added
|
||||
/* Class = "NSMenuItem"; title = "Direction"; ObjectID = "ICu-yD-nVi"; */
|
||||
"ICu-yD-nVi.title" = "Direction"; // FIXME: added
|
||||
/* Class = "NSMenuItem"; title = "Left to Right"; ObjectID = "7pw-5S-ekC"; */
|
||||
"7pw-5S-ekC.title" = "从左到右";
|
||||
/* Class = "NSMenuItem"; title = "Right to Left"; ObjectID = "clG-Ph-Iyz"; */
|
||||
"clG-Ph-Iyz.title" = "从右到左";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Use Vertical Orientation"; ObjectID = "bTd-nG-jjc"; */
|
||||
"bTd-nG-jjc.title" = "使用垂直方向";
|
||||
/* Class = "NSMenuItem"; title = "Wrap Lines"; ObjectID = "286"; */
|
||||
"286.title" = "换行";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Theme"; ObjectID = "8z7-Jc-agP"; */
|
||||
"8z7-Jc-agP.title" = "主题";
|
||||
|
Loading…
Reference in New Issue
Block a user