Skip to content

Commit

Permalink
Add annotations and visibility classes to some Japanese-specific sett…
Browse files Browse the repository at this point in the history
…ings

* Add "Japanese only" label to some settings

* Add a .jp-only visibility class and apply it to some settings

* Add the .jpzhyue-only visibility class to the Term display setting

<rikaitan.link>MGFhMDVlMjFiMTlkZmQxZjRjMWUxMGZiMGIxOTAyMzAxMDM4MzBiZgo=</rikaitan.link>
  • Loading branch information
jason-ojisan committed Dec 12, 2024
1 parent 102265b commit d6ac89b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
3 changes: 3 additions & 0 deletions ext/css/visibility-modifiers.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
:root:is([data-language=ja], [data-language=zh], [data-language=yue], [data-language=ko]) .not-jpzhyueko {
display: none;
}
:root:not([data-language=ja]) .jp-only {
display: none;
}
15 changes: 9 additions & 6 deletions ext/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ <h1>Rikaitan Settings</h1>
<label class="toggle"><input type="checkbox" data-setting="general.debugInfo"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
</div>
</div></div>
<div class="settings-item advanced-only"><div class="settings-item-inner">
<div class="settings-item advanced-only jpzhyue-only"><div class="settings-item-inner">
<div class="settings-item-left">
<div class="settings-item-label">Term display style</div>
<div class="settings-item-description">Change how terms and their readings are displayed.</div>
Expand All @@ -878,10 +878,10 @@ <h1>Rikaitan Settings</h1>
</select>
</div>
</div></div>
<div class="settings-item advanced-only"><div class="settings-item-inner settings-item-inner-wrappable">
<div class="settings-item advanced-only jp-only"><div class="settings-item-inner settings-item-inner-wrappable">
<div class="settings-item-left">
<div class="settings-item-label">Reading mode</div>
<div class="settings-item-description">Change what type of furigana is displayed for parsed text.</div>
<div class="settings-item-description">Change what type of furigana is displayed for parsed text. Japanese only.</div>
</div>
<div class="settings-item-right">
<select data-setting="parsing.readingMode" lang="ja">
Expand Down Expand Up @@ -933,7 +933,10 @@ <h1>Rikaitan Settings</h1>
<div class="settings-item-left">
<div class="settings-item-label">
Pitch accent display styles
<a tabindex="0" class="more-toggle more-only" data-parent-distance="4">(?)</a>
</div>
<div class="settings-item-description">
Japanese only.
<a tabindex="0" class="more-toggle more-only" data-parent-distance="4">More&hellip;</a>
</div>
</div>
<div class="settings-item-right flex-row-wrap">
Expand Down Expand Up @@ -1521,15 +1524,15 @@ <h1>Rikaitan Settings</h1>
</p>
</div>
</div>
<div class="settings-item advanced-only" data-hide-for-browser="firefox-mobile">
<div class="settings-item advanced-only jp-only" data-hide-for-browser="firefox-mobile">
<div class="settings-item-inner">
<div class="settings-item-left">
<div class="settings-item-invalid-indicator"></div>
<div class="settings-item-label">
Parse sentences using <a href="https://en.wikipedia.org/wiki/MeCab" target="_blank" rel="noopener noreferrer">MeCab</a>
</div>
<div class="settings-item-description">
Sentence words are parsed using a third-party program.
Sentence words are parsed using a third-party program. Japanese only.
<a tabindex="0" class="more-toggle more-only" data-parent-distance="4">More&hellip;</a>
</div>
</div>
Expand Down

0 comments on commit d6ac89b

Please sign in to comment.