aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/css/settings2.css
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-01-03 12:12:55 -0500
committerGitHub <noreply@github.com>2021-01-03 12:12:55 -0500
commit8e304b83c685dde17a00d402877a21303b7c11f2 (patch)
tree0b2123575502c3e3cb5127582b03e9c196c9891d /ext/bg/css/settings2.css
parenteda8534e195d653ee0dea36f70caed0d8d49acf1 (diff)
Translator regex replacements (#1199)
* Add support for regex replacements during the translation process * Allow assignment of textReplacements * Rename * Set up test data * Write expected data * Set up options * Prevent infinite loop if regex matches empty string * Implement setting controller * Add support for testing pattern replacements
Diffstat (limited to 'ext/bg/css/settings2.css')
-rw-r--r--ext/bg/css/settings2.css107
1 files changed, 107 insertions, 0 deletions
diff --git a/ext/bg/css/settings2.css b/ext/bg/css/settings2.css
index 8759e941..9d3d081d 100644
--- a/ext/bg/css/settings2.css
+++ b/ext/bg/css/settings2.css
@@ -1732,6 +1732,113 @@ code.anki-field-marker {
height: calc(0.425em * 4 + 1em * var(--line-height-default) * 3);
}
+#translation-text-replacement-list-empty {
+ display: none;
+}
+#translation-text-replacement-list:empty+#translation-text-replacement-list-empty {
+ display: block;
+}
+.translation-text-replacement-entry {
+ display: grid;
+ grid-template-columns: auto auto 1fr auto;
+ grid-template-rows: auto;
+ grid-template-areas:
+ "index pattern-label pattern button"
+ ". replacement-label replacement button"
+ ". test-label test .";
+ column-gap: 0.25em;
+ row-gap: 0.25em;
+ align-items: stretch;
+ justify-items: stretch;
+}
+.translation-text-replacement-entry+.translation-text-replacement-entry {
+ margin-top: 0.5em;
+}
+.translation-text-replacement-index {
+ grid-area: index;
+ align-self: center;
+ justify-self: start;
+ padding-right: 0.5em;
+}
+.translation-text-replacement-pattern-label {
+ grid-area: pattern-label;
+ align-self: center;
+ justify-self: start;
+ padding-right: 0.5em;
+}
+.translation-text-replacement-replacement-label {
+ grid-area: replacement-label;
+ align-self: center;
+ justify-self: start;
+ padding-right: 0.5em;
+}
+.translation-text-replacement-pattern-container {
+ grid-area: pattern;
+ align-self: stretch;
+ justify-self: stretch;
+ display: flex;
+ flex-flow: row nowrap;
+ align-items: stretch;
+}
+.translation-text-replacement-replacement-container {
+ grid-area: replacement;
+ align-self: stretch;
+ justify-self: stretch;
+ display: flex;
+ flex-flow: row nowrap;
+ align-items: stretch;
+}
+input.translation-text-replacement-pattern,
+input.translation-text-replacement-replacement {
+ flex: 1 1 auto;
+ width: auto;
+}
+.translation-text-replacement-checkbox-container {
+ white-space: nowrap;
+ display: flex;
+ flex-flow: row nowrap;
+ align-items: center;
+ padding-left: 0.5em;
+}
+.translation-text-replacement-checkbox-label {
+ padding-left: 0.5em;
+}
+.translation-text-replacement-button {
+ grid-area: button;
+ align-self: center;
+ justify-self: start;
+}
+.translation-text-replacement-test-label {
+ grid-area: test-label;
+ align-self: center;
+ justify-self: start;
+ padding-right: 0.5em;
+}
+.translation-text-replacement-test-container {
+ grid-area: test;
+ align-self: stretch;
+ justify-self: stretch;
+ display: flex;
+ flex-flow: row nowrap;
+ align-items: stretch;
+}
+input.translation-text-replacement-test-input,
+input.translation-text-replacement-test-output {
+ flex: 1 1 auto;
+ width: auto;
+}
+.translation-text-replacement-test-label-inner {
+ grid-area: button;
+ align-self: center;
+ justify-self: start;
+ flex: 0 0 auto;
+ padding: 0 0.5em;
+ white-space: nowrap;
+}
+.translation-text-replacement-entry:not([data-test-visible=true]) .translation-text-replacement-test-node {
+ display: none;
+}
+
/* Generic layouts */
.margin-above {