tess_edit 0.5.5 → 0.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,26 +5,27 @@
5
5
  // what the key already says in the language, if anything: the dialog then
6
6
  // asks to replace it.
7
7
 
8
+ import { t } from "tess_edit/core/i18n"
8
9
  import { textParts, validKey } from "tess_edit/core/translations"
9
10
  import { askText } from "tess_edit/ui/dialog"
10
11
  import { h } from "tess_edit/ui/dom"
11
12
 
12
13
  export function askTranslationKey(root, { text, locale, suggested, existing }) {
13
14
  return askText(root, {
14
- title: "Make translatable",
15
- label: "Key",
15
+ title: t("Make translatable"),
16
+ label: t("Key"),
16
17
  value: suggested,
17
- hint: "A key starting with a dot belongs to this template.",
18
+ hint: t("A key starting with a dot belongs to this template."),
18
19
  body: h(
19
20
  "div",
20
21
  { class: "rounded-md bg-gray-50 dark:bg-gray-700/50 px-3 py-2" },
21
- h("span", { class: "mb-1 block text-[11px] font-semibold uppercase tracking-wide text-gray-500 dark:text-gray-400" }, `${locale.toUpperCase()} text`),
22
+ h("span", { class: "mb-1 block text-[11px] font-semibold uppercase tracking-wide text-gray-500 dark:text-gray-400" }, t("%{locale} text", { locale: locale.toUpperCase() })),
22
23
  h("span", { class: "block", "data-tess-edit-translation-text": "" }, textParts(text).map((part) => part.text ?? h("span", { class: "rounded bg-blue-100 dark:bg-blue-900/50 px-1 text-[12px] text-blue-800 dark:text-blue-200" }, part.placeholder)))
23
24
  ),
24
25
  check: async (key) => {
25
- if (!validKey(key)) return "A key is made of letters, digits, _ and -, separated by dots, e.g. .order.thanks"
26
+ if (!validKey(key)) return t("A key is made of letters, digits, _ and -, separated by dots, e.g. .order.thanks")
26
27
  const current = await existing(key)
27
- return current !== null && current !== text ? { confirm: `${key} already says “${current}” in ${locale.toUpperCase()}.`, label: "Replace" } : null
28
+ return current !== null && current !== text ? { confirm: t("%{key} already says “%{current}” in %{locale}.", { key, current, locale: locale.toUpperCase() }), label: t("Replace") } : null
28
29
  }
29
30
  }).then((key) => key || null)
30
31
  }
@@ -3,6 +3,7 @@
3
3
  // hint: missing ones stand out, each can be edited in place, and the arrow
4
4
  // opens where the host app keeps it.
5
5
 
6
+ import { t } from "tess_edit/core/i18n"
6
7
  import { textParts } from "tess_edit/core/translations"
7
8
  import { h } from "tess_edit/ui/dom"
8
9
  import { icon } from "tess_edit/ui/icons"
@@ -35,7 +36,7 @@ export class TranslationPopover {
35
36
  this.element = h("div", {
36
37
  class: "absolute z-50 w-80 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 py-1.5 text-[13px] shadow-lg",
37
38
  role: "dialog",
38
- "aria-label": "Translations",
39
+ "aria-label": t("Translations"),
39
40
  "data-tess-edit-translations": "",
40
41
  onmouseenter: () => this.cancelHide(),
41
42
  onmouseleave: () => this.scheduleHide()
@@ -83,19 +84,19 @@ export class TranslationPopover {
83
84
  : h(
84
85
  "span",
85
86
  { class: `min-w-0 flex-1 truncate ${value === null ? "italic text-red-600 dark:text-red-400" : "text-gray-800 dark:text-gray-200"}`, title: entry?.source ? `${value ?? ""}\n${entry.source}` : value || "" },
86
- value === null ? "missing" : value ? textParts(value).map((part) => part.text ?? h("span", { class: "rounded bg-blue-100 dark:bg-blue-900/50 px-1 text-[12px] text-blue-800 dark:text-blue-200" }, part.placeholder)) : "(empty)"
87
+ value === null ? t("missing") : value ? textParts(value).map((part) => part.text ?? h("span", { class: "rounded bg-blue-100 dark:bg-blue-900/50 px-1 text-[12px] text-blue-800 dark:text-blue-200" }, part.placeholder)) : t("(empty)")
87
88
  )
88
89
  return h(
89
90
  "div",
90
91
  { class: `flex items-center gap-2 px-3 py-1 ${locale === current ? "bg-blue-50/60 dark:bg-blue-900/20" : ""}`, "data-locale": locale },
91
92
  h("span", { class: "w-12 shrink-0 font-semibold uppercase text-gray-900 dark:text-gray-100" }, locale),
92
93
  text,
93
- editing ? null : h("button", { type: "button", title: `Edit the ${locale.toUpperCase()} text`, class: ACTION, html: icon("edit", "w-3.5 h-3.5"), onclick: () => this.edit(locale) }),
94
- !editing && entry?.url ? h("a", { href: entry.url, target: "_blank", rel: "noopener", title: entry.source ? `Open ${entry.source}` : "Open where it's kept", class: ACTION, html: icon("external", "w-3.5 h-3.5") }) : null
94
+ editing ? null : h("button", { type: "button", title: t("Edit the %{locale} text", { locale: locale.toUpperCase() }), class: ACTION, html: icon("edit", "w-3.5 h-3.5"), onclick: () => this.edit(locale) }),
95
+ !editing && entry?.url ? h("a", { href: entry.url, target: "_blank", rel: "noopener", title: entry.source ? t("Open %{source}", { source: entry.source }) : t("Open where it's kept"), class: ACTION, html: icon("external", "w-3.5 h-3.5") }) : null
95
96
  )
96
97
  })
97
98
  const empty = !locales.length
98
- ? h("p", { class: "px-3 py-1 text-xs text-gray-500 dark:text-gray-400" }, this.translations.error || (this.translations.loaded ? "No languages yet" : "Loading…"))
99
+ ? h("p", { class: "px-3 py-1 text-xs text-gray-500 dark:text-gray-400" }, this.translations.error || t(this.translations.loaded ? "No languages yet" : "Loading…"))
99
100
  : null
100
101
  // replaceChildren would turn a null into the text "null", so only pass real elements.
101
102
  this.element.replaceChildren(...[
@@ -112,7 +113,7 @@ export class TranslationPopover {
112
113
  type: "text",
113
114
  class: "min-w-0 flex-1 rounded border border-blue-500 bg-white dark:bg-gray-700 px-1.5 py-0.5 text-[13px] text-gray-900 dark:text-gray-100 outline-none",
114
115
  value: value ?? "",
115
- "aria-label": `${locale.toUpperCase()} text`,
116
+ "aria-label": t("%{locale} text", { locale: locale.toUpperCase() }),
116
117
  onkeydown: (event) => {
117
118
  if (event.key === "Enter") {
118
119
  event.preventDefault()
@@ -131,7 +132,7 @@ export class TranslationPopover {
131
132
  "span",
132
133
  { class: "flex min-w-0 flex-1 items-center gap-1" },
133
134
  input,
134
- h("button", { type: "button", class: "shrink-0 rounded bg-blue-600 px-2 py-0.5 text-xs font-medium text-white hover:bg-blue-700", onclick: () => this.save(locale, input.value) }, "Save")
135
+ h("button", { type: "button", class: "shrink-0 rounded bg-blue-600 px-2 py-0.5 text-xs font-medium text-white hover:bg-blue-700", onclick: () => this.save(locale, input.value) }, t("Save"))
135
136
  )
136
137
  }
137
138
 
@@ -2,6 +2,7 @@
2
2
  // dragging. Rows also take blocks dragged from the Blocks panel.
3
3
 
4
4
  import { find, isDescendant } from "tess_edit/core/document"
5
+ import { t } from "tess_edit/core/i18n"
5
6
  import { getBlock, isContainer, label } from "tess_edit/core/registry"
6
7
  import { h } from "tess_edit/ui/dom"
7
8
  import { icon } from "tess_edit/ui/icons"
@@ -45,7 +46,7 @@ export class Tree {
45
46
  const add = container && this.editor.accepted(node.id).length
46
47
  ? h("button", {
47
48
  type: "button",
48
- title: "Add a block inside",
49
+ title: t("Add a block inside"),
49
50
  class: "ml-auto hidden group-hover:flex w-5 h-5 items-center justify-center rounded text-gray-500 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-600 hover:text-gray-900 dark:hover:text-gray-100",
50
51
  html: icon("plus", "w-3.5 h-3.5"),
51
52
  onclick: (event) => {
@@ -81,7 +82,7 @@ export class Tree {
81
82
  toggle,
82
83
  h("span", { class: `shrink-0 ${getBlock(node.type)?.accepts === "inherit" ? "text-amber-600 dark:text-amber-400" : "text-gray-400 dark:text-gray-500"}`, html: icon(getBlock(node.type)?.icon, "w-4 h-4") }),
83
84
  h("span", { class: `truncate text-[13px] ${locked ? "text-gray-400 dark:text-gray-500" : ""}` }, label(node)),
84
- locked ? h("span", { class: "ml-auto shrink-0 text-gray-300 dark:text-gray-600", title: "Part of the layout", html: icon("lock", "w-3.5 h-3.5") }) : add,
85
+ locked ? h("span", { class: "ml-auto shrink-0 text-gray-300 dark:text-gray-600", title: t("Part of the layout"), html: icon("lock", "w-3.5 h-3.5") }) : add,
85
86
  h("div", { class: "tess-tree-marker pointer-events-none absolute left-1 right-1 hidden" })
86
87
  )
87
88
 
@@ -15,6 +15,7 @@
15
15
 
16
16
  import { keyCompletion, keyToken } from "tess_edit/core/translations"
17
17
  import { completion, liquidToken } from "tess_edit/core/variables"
18
+ import { t } from "tess_edit/core/i18n"
18
19
  import { h } from "tess_edit/ui/dom"
19
20
 
20
21
  const ITEM = "flex w-full items-center gap-2 px-2.5 py-1.5 text-left text-[13px]"
@@ -164,7 +165,7 @@ export class VariableMenu {
164
165
  this.element = h("div", {
165
166
  class: "absolute z-50 w-72 max-h-72 overflow-y-auto rounded-md border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 py-1 shadow-lg",
166
167
  role: "listbox",
167
- "aria-label": "Variables",
168
+ "aria-label": t("Variables"),
168
169
  // Keep the focus (and caret) in the field being typed in
169
170
  onmousedown: (event) => event.preventDefault(),
170
171
  onkeydown: (event) => event.key === "Escape" && this.close()
@@ -184,7 +185,7 @@ export class VariableMenu {
184
185
  path
185
186
  ? h("button", { type: "button", class: "rounded px-1 text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/40", onclick: () => this.browse(adapter, this.anchor, path.split(".").slice(0, -1).join(".")) }, "‹ Back")
186
187
  : null,
187
- h("span", { class: "truncate font-mono" }, path || "Variables")
188
+ h("span", { class: "truncate font-mono" }, path || t("Variables"))
188
189
  )
189
190
  : null
190
191
  const rows = items.map((item, i) =>
@@ -198,12 +199,12 @@ export class VariableMenu {
198
199
  title: item.hint || "",
199
200
  onclick: () => choose(item)
200
201
  },
201
- h("span", { class: "min-w-0 flex-1 truncate" }, item.label || item.name),
202
+ h("span", { class: "min-w-0 flex-1 truncate" }, t(item.label) || item.name),
202
203
  h("span", { class: "shrink-0 font-mono text-[11px] text-gray-500 dark:text-gray-400" }, item.name),
203
204
  item.children && !(adapter.mode === "collection" && item.collection) ? h("span", { class: "shrink-0 text-gray-400 dark:text-gray-500" }, "›") : null
204
205
  )
205
206
  )
206
- const empty = !items.length ? h("p", { class: "px-2.5 py-1.5 text-xs text-gray-500 dark:text-gray-400" }, error || "No variables here") : null
207
+ const empty = !items.length ? h("p", { class: "px-2.5 py-1.5 text-xs text-gray-500 dark:text-gray-400" }, error || t("No variables here")) : null
207
208
  this.element.replaceChildren(...[header, ...rows, empty].filter(Boolean))
208
209
  this.place(browse ? this.anchor.getBoundingClientRect() : adapter.rect())
209
210
  this.element.querySelector("[aria-selected='true']")?.scrollIntoView({ block: "nearest" })
@@ -0,0 +1,230 @@
1
+ # The editor's own words (app/javascript/tess_edit/core/i18n.js), each its English as it's written in the
2
+ # JavaScript, which is how the editor finds it: the tess_edit_translations helper gives the editor
3
+ # what each says in the page's language. npm test checks there's one for each text it can show.
4
+ en:
5
+ tess_edit:
6
+ editor:
7
+ a_key_is_made_of_letters_digits_and_separated_by_dots_e_g_or: "A key is made of letters, digits, _ and -, separated by dots, e.g. .order.thanks"
8
+ a_key_starting_with_a_dot_belongs_to_this_template: "A key starting with a dot belongs to this template."
9
+ a_liquid_condition_e_g_order_total_100: "A Liquid condition, e.g. order.total > 100."
10
+ action_failed_status: "%{action} failed (%{status})"
11
+ add: "Add"
12
+ add_a_block_below: "Add a block below"
13
+ add_a_block_inside: "Add a block inside"
14
+ add_block: "Add block"
15
+ add_link: "Add link"
16
+ added_to_the_email_s_style_block: "Added to the email's <style> block."
17
+ align: "Align"
18
+ align_center: "Align center"
19
+ align_left: "Align left"
20
+ align_right: "Align right"
21
+ all_panels_on_the_left: "All panels on the left"
22
+ all_panels_on_the_right: "All panels on the right"
23
+ alt_text: "Alt text"
24
+ auto: "Auto"
25
+ background: "Background"
26
+ background_image: "Background image"
27
+ below_this_width_columns_stack: "Below this width columns stack."
28
+ blocks: "Blocks"
29
+ blocks_on_the_left_inspect_on_the_right: "Blocks on the left, Inspect on the right"
30
+ bold_b: "Bold (⌘B)"
31
+ border: "Border"
32
+ bottom: "Bottom"
33
+ breakpoint: "Breakpoint"
34
+ bulleted_list: "Bulleted list"
35
+ button: "Button"
36
+ button_color: "Button color"
37
+ cancel: "Cancel"
38
+ center: "Center"
39
+ center_center: "center center"
40
+ choose_an_image: "Choose an image"
41
+ clear_formatting: "Clear formatting"
42
+ click_again_to_use_the_default: "Click again to use the default"
43
+ close: "Close"
44
+ code: "Code"
45
+ collection: "Collection"
46
+ color: "Color"
47
+ column: "Column"
48
+ column_order: "Column order"
49
+ condition: "Condition"
50
+ content: "Content"
51
+ copied: "Copied."
52
+ copied_into_the_email_as_is_liquid_works_here_too: "Copied into the email as-is. Liquid works here too."
53
+ copy: "Copy"
54
+ css: "CSS"
55
+ custom_css: "Custom CSS"
56
+ dashed: "Dashed"
57
+ default: "Default"
58
+ delete: "Delete"
59
+ desktop: "Desktop"
60
+ divider: "Divider"
61
+ done: "Done"
62
+ dotted: "Dotted"
63
+ double_click_the_text_on_the_canvas_to_edit_it: "Double-click the text on the canvas to edit it."
64
+ download: "Download"
65
+ drag_blocks_onto_the_canvas_or_into_the_layers_tree_liquid_b: "Drag blocks onto the canvas or into the Layers tree. Liquid blocks wrap other blocks in {% for %} or {% if %}."
66
+ drag_onto_the_canvas_or_click_to_add: "Drag onto the canvas, or click to add"
67
+ drag_to_move: "Drag to move"
68
+ drag_to_resize: "Drag to resize"
69
+ drop_a_column_here: "Drop a column here"
70
+ drop_a_section_here: "Drop a section here"
71
+ drop_content_here: "Drop content here"
72
+ duplicate: "Duplicate"
73
+ each_of_collection: "Each of %{collection}"
74
+ edit: "Edit"
75
+ edit_label_in_a_larger_window: "Edit %{label} in a larger window"
76
+ edit_link: "Edit link"
77
+ edit_the_locale_text: "Edit the %{locale} text"
78
+ editing_text_key_to_finish: "Editing text · %{key} to finish"
79
+ email: "Email"
80
+ empty: "(empty)"
81
+ expand: "Expand"
82
+ find_in_source: "Find in %{source}"
83
+ fixed_height: "Fixed height"
84
+ fluid: "Fluid"
85
+ font_family: "Font family"
86
+ font_size: "Font size"
87
+ font_weight: "Font weight"
88
+ fonts: "Fonts"
89
+ full: "Full"
90
+ full_width: "Full width"
91
+ hamburger_on_mobile: "Hamburger on mobile"
92
+ heading: "Heading"
93
+ heading_level: "Heading %{level}"
94
+ height: "Height"
95
+ hero: "Hero"
96
+ hide_panels: "Hide panels"
97
+ horizontal: "Horizontal"
98
+ html: "HTML"
99
+ icon_padding: "Icon padding"
100
+ icon_size: "Icon size"
101
+ image: "Image"
102
+ image_height: "Image height"
103
+ image_width: "Image width"
104
+ in_px_or_e_g_50: "In px or %, e.g. 50%."
105
+ inherit: "Inherit"
106
+ inner_padding: "Inner padding"
107
+ insert_a_variable: "Insert a variable"
108
+ inspect: "Inspect"
109
+ italic_i: "Italic (⌘I)"
110
+ key: "Key"
111
+ key_already_says_current_in_locale: "%{key} already says “%{current}” in %{locale}."
112
+ key_no_locale_text: "%{key} · no %{locale} text"
113
+ keys: "Keys"
114
+ label: "Label"
115
+ layers: "Layers"
116
+ layout: "Layout"
117
+ left: "Left"
118
+ left_to_right: "Left to right"
119
+ letter_spacing: "Letter spacing"
120
+ line_height: "Line height"
121
+ link: "Link"
122
+ links: "Links"
123
+ liquid: "Liquid"
124
+ liquid_is_allowed_e_g_order_url: "Liquid is allowed, e.g. {{ order.url }}"
125
+ liquid_is_left_in_place_for_rendering_at_send_time: "Liquid is left in place for rendering at send time."
126
+ liquid_loops_and_conditions_are_in_mj_raw_tags: "Liquid loops and conditions are in <mj-raw> tags."
127
+ liquid_tags_can_t_go_into_a_translation_select_the_text_arou: "Liquid tags ({% … %}) can't go into a translation. Select the text around them."
128
+ load_this_json: "Load this JSON"
129
+ loading: "Loading…"
130
+ loading_the_images: "Loading the images"
131
+ loading_the_translations_failed_status: "Loading the translations failed (%{status})"
132
+ loading_the_variables_failed_status: "Loading the variables failed (%{status})"
133
+ locale_text: "%{locale} text"
134
+ loop: "Loop"
135
+ make_translatable: "Make translatable"
136
+ make_translatable_keep_the_selected_text_as_a_translation: "Make translatable: keep the selected text as a translation"
137
+ make_translatable_keep_the_selected_text_or_all_of_it_as_a_t: "Make translatable: keep the selected text, or all of it, as a translation"
138
+ message: "Message"
139
+ middle: "Middle"
140
+ missing: "missing"
141
+ mobile: "Mobile"
142
+ mode: "Mode"
143
+ move_up: "Move up"
144
+ name_can_t_go_here_its_type_blocks_don_t_fit: "%{name} can't go here: its %{type} blocks don't fit."
145
+ name_canvas: "%{name} canvas"
146
+ name_doesn_t_fit_anywhere_yet_add_a_block_it_goes_in_first_o: "%{name} doesn't fit anywhere yet. Add a block it goes in first, or drag it onto the canvas."
147
+ name_doesn_t_fit_here_select_where_it_goes_first_or_drag_it: "%{name} doesn't fit here. Select where it goes first, or drag it onto the canvas."
148
+ navbar: "Navbar"
149
+ network: "Network"
150
+ new_tab: "New tab"
151
+ no_argument_for_names_in_the_t_filter: "No argument for %{names} in the t filter"
152
+ no_fonts_with_that_name: "No fonts with that name"
153
+ no_images_yet: "No images yet"
154
+ no_languages_yet: "No languages yet"
155
+ no_variables_here: "No variables here"
156
+ nothing_matches: "Nothing matches."
157
+ numbered_list: "Numbered list"
158
+ off_word: "Off"
159
+ on_word: "On"
160
+ open_in: "Open in"
161
+ open_source: "Open %{source}"
162
+ open_where_it_s_kept: "Open where it's kept"
163
+ padding: "Padding"
164
+ paragraph: "Paragraph"
165
+ paragraph_style: "Paragraph style"
166
+ part_of_the_layout: "Part of the layout"
167
+ position: "Position"
168
+ preview: "Preview"
169
+ preview_text: "Preview text"
170
+ preview_the_email_as_sent_with_liquid_tags: "Preview the email as sent, with Liquid tags"
171
+ radius: "Radius"
172
+ redo_z: "Redo (⇧⌘Z)"
173
+ remove: "Remove"
174
+ remove_link: "Remove link"
175
+ repeats_its_blocks_for_each_item_for_variable_in_collection: "Repeats its blocks for each item: {% for variable in collection %}."
176
+ replace: "Replace"
177
+ right: "Right"
178
+ right_to_left: "Right to left"
179
+ same_tab: "Same tab"
180
+ save: "Save"
181
+ saving_the_translation_failed_status: "Saving the translation failed (%{status})"
182
+ search_fonts: "Search fonts"
183
+ section: "Section"
184
+ select_parent: "Select parent"
185
+ select_the_text_to_translate_first: "Select the text to translate first."
186
+ show_panels: "Show panels"
187
+ show_translations_in: "Show translations in"
188
+ show_when: "Show when"
189
+ shown_after_the_subject_in_most_inboxes: "Shown after the subject in most inboxes."
190
+ shows_its_blocks_only_when_the_condition_is_true_if_expressi: "Shows its blocks only when the condition is true: {% if expression %}."
191
+ social: "Social"
192
+ solid: "Solid"
193
+ spacer: "Spacer"
194
+ strikethrough: "Strikethrough"
195
+ style: "Style"
196
+ subject: "Subject"
197
+ text: "Text"
198
+ text_color: "Text color"
199
+ the_content_of_the_documents_using_this_layout_goes_here_wha: "The content of the documents using this layout goes here. What you put inside is example content for designing the layout."
200
+ the_document_edit_and_load_it_or_paste_one_in: "The document. Edit and load it, or paste one in."
201
+ the_document_parts_of_it_are_locked_so_it_can_t_be_loaded_he: "The document. Parts of it are locked, so it can't be loaded here."
202
+ the_email_could_not_be_compiled: "The email could not be compiled"
203
+ the_name_could_not_be_rendered: "The %{name} could not be rendered"
204
+ the_name_each_item_gets_e_g_line: "The name each item gets, e.g. line."
205
+ the_upload: "The upload"
206
+ theme: "Theme"
207
+ there_are_no_languages_to_translate_into_yet: "There are no languages to translate into yet."
208
+ there_is_a_name_already_a_document_has_one: "There is a %{name} already; a document has one."
209
+ there_s_nothing_here_yet: "There's nothing here yet."
210
+ thickness: "Thickness"
211
+ this: "This"
212
+ too_narrow_to_split_the_panels: "Too narrow to split the panels"
213
+ top: "Top"
214
+ translations: "Translations"
215
+ type_the_text_to_translate_first: "Type the text to translate first."
216
+ typography: "Typography"
217
+ underline_u: "Underline (⌘U)"
218
+ undo_z: "Undo (⌘Z)"
219
+ upload: "Upload"
220
+ uploaded: "Uploaded"
221
+ uploading: "Uploading…"
222
+ url: "URL"
223
+ variable: "Variable"
224
+ variables: "Variables"
225
+ vertical: "Vertical"
226
+ vertical_align: "Vertical align"
227
+ web: "Web"
228
+ what_to_loop_over_e_g_invoice_lines: "What to loop over, e.g. invoice.lines."
229
+ width: "Width"
230
+ wrapper: "Wrapper"
@@ -0,0 +1,230 @@
1
+ # The editor's own words (app/javascript/tess_edit/core/i18n.js), each its English as it's written in the
2
+ # JavaScript, which is how the editor finds it: the tess_edit_translations helper gives the editor
3
+ # what each says in the page's language. npm test checks there's one for each text it can show.
4
+ nl:
5
+ tess_edit:
6
+ editor:
7
+ a_key_is_made_of_letters_digits_and_separated_by_dots_e_g_or: "Een sleutel bestaat uit letters, cijfers, _ en -, gescheiden door punten, bijv. .order.thanks"
8
+ a_key_starting_with_a_dot_belongs_to_this_template: "Een sleutel die met een punt begint, hoort bij deze template."
9
+ a_liquid_condition_e_g_order_total_100: "Een Liquid-voorwaarde, bijv. order.total > 100."
10
+ action_failed_status: "%{action} is mislukt (%{status})"
11
+ add: "Toevoegen"
12
+ add_a_block_below: "Blok eronder toevoegen"
13
+ add_a_block_inside: "Blok erin toevoegen"
14
+ add_block: "Blok toevoegen"
15
+ add_link: "Link toevoegen"
16
+ added_to_the_email_s_style_block: "Wordt toegevoegd aan het <style>-blok van de e-mail."
17
+ align: "Uitlijning"
18
+ align_center: "Centreren"
19
+ align_left: "Links uitlijnen"
20
+ align_right: "Rechts uitlijnen"
21
+ all_panels_on_the_left: "Alle panelen links"
22
+ all_panels_on_the_right: "Alle panelen rechts"
23
+ alt_text: "Alternatieve tekst"
24
+ auto: "Automatisch"
25
+ background: "Achtergrond"
26
+ background_image: "Achtergrondafbeelding"
27
+ below_this_width_columns_stack: "Onder deze breedte komen kolommen onder elkaar."
28
+ blocks: "Blokken"
29
+ blocks_on_the_left_inspect_on_the_right: "Blokken links, eigenschappen rechts"
30
+ bold_b: "Vet (⌘B)"
31
+ border: "Rand"
32
+ bottom: "Onder"
33
+ breakpoint: "Breekpunt"
34
+ bulleted_list: "Opsomming"
35
+ button: "Knop"
36
+ button_color: "Knopkleur"
37
+ cancel: "Annuleren"
38
+ center: "Midden"
39
+ center_center: "center center"
40
+ choose_an_image: "Kies een afbeelding"
41
+ clear_formatting: "Opmaak wissen"
42
+ click_again_to_use_the_default: "Klik nogmaals voor de standaardwaarde"
43
+ close: "Sluiten"
44
+ code: "Code"
45
+ collection: "Verzameling"
46
+ color: "Kleur"
47
+ column: "Kolom"
48
+ column_order: "Kolomvolgorde"
49
+ condition: "Voorwaarde"
50
+ content: "Inhoud"
51
+ copied: "Gekopieerd."
52
+ copied_into_the_email_as_is_liquid_works_here_too: "Wordt ongewijzigd in de e-mail gezet. Liquid werkt hier ook."
53
+ copy: "Kopiëren"
54
+ css: "CSS"
55
+ custom_css: "Eigen CSS"
56
+ dashed: "Gestreept"
57
+ default: "Standaard"
58
+ delete: "Verwijderen"
59
+ desktop: "Desktop"
60
+ divider: "Scheidingslijn"
61
+ done: "Klaar"
62
+ dotted: "Gestippeld"
63
+ double_click_the_text_on_the_canvas_to_edit_it: "Dubbelklik op de tekst op het canvas om die te bewerken."
64
+ download: "Downloaden"
65
+ drag_blocks_onto_the_canvas_or_into_the_layers_tree_liquid_b: "Sleep blokken naar het canvas of in de boom bij Lagen. Liquid-blokken zetten andere blokken in {% for %} of {% if %}."
66
+ drag_onto_the_canvas_or_click_to_add: "Sleep naar het canvas, of klik om toe te voegen"
67
+ drag_to_move: "Sleep om te verplaatsen"
68
+ drag_to_resize: "Sleep om het formaat te wijzigen"
69
+ drop_a_column_here: "Zet hier een kolom neer"
70
+ drop_a_section_here: "Zet hier een sectie neer"
71
+ drop_content_here: "Zet hier inhoud neer"
72
+ duplicate: "Dupliceren"
73
+ each_of_collection: "Elk item van %{collection}"
74
+ edit: "Bewerken"
75
+ edit_label_in_a_larger_window: "%{label} in een groter venster bewerken"
76
+ edit_link: "Link bewerken"
77
+ edit_the_locale_text: "De %{locale}-tekst bewerken"
78
+ editing_text_key_to_finish: "Tekst bewerken · %{key} om af te ronden"
79
+ email: "E-mail"
80
+ empty: "(leeg)"
81
+ expand: "Vergroten"
82
+ find_in_source: "Zoeken in %{source}"
83
+ fixed_height: "Vaste hoogte"
84
+ fluid: "Meeschalend"
85
+ font_family: "Lettertype"
86
+ font_size: "Lettergrootte"
87
+ font_weight: "Letterdikte"
88
+ fonts: "Lettertypen"
89
+ full: "Volledig"
90
+ full_width: "Volle breedte"
91
+ hamburger_on_mobile: "Hamburgermenu op mobiel"
92
+ heading: "Kop"
93
+ heading_level: "Kop %{level}"
94
+ height: "Hoogte"
95
+ hero: "Banner"
96
+ hide_panels: "Panelen verbergen"
97
+ horizontal: "Horizontaal"
98
+ html: "HTML"
99
+ icon_padding: "Ruimte rond pictogram"
100
+ icon_size: "Pictogramgrootte"
101
+ image: "Afbeelding"
102
+ image_height: "Afbeeldingshoogte"
103
+ image_width: "Afbeeldingsbreedte"
104
+ in_px_or_e_g_50: "In px of %, bijv. 50%."
105
+ inherit: "Overnemen"
106
+ inner_padding: "Binnenruimte"
107
+ insert_a_variable: "Variabele invoegen"
108
+ inspect: "Eigenschappen"
109
+ italic_i: "Cursief (⌘I)"
110
+ key: "Sleutel"
111
+ key_already_says_current_in_locale: "%{key} is in het %{locale} al “%{current}”."
112
+ key_no_locale_text: "%{key} · geen %{locale}-tekst"
113
+ keys: "Sleutels"
114
+ label: "Label"
115
+ layers: "Lagen"
116
+ layout: "Layout"
117
+ left: "Links"
118
+ left_to_right: "Links naar rechts"
119
+ letter_spacing: "Letterafstand"
120
+ line_height: "Regelhoogte"
121
+ link: "Link"
122
+ links: "Links"
123
+ liquid: "Liquid"
124
+ liquid_is_allowed_e_g_order_url: "Liquid mag, bijv. {{ order.url }}"
125
+ liquid_is_left_in_place_for_rendering_at_send_time: "Liquid blijft staan en wordt bij het versturen ingevuld."
126
+ liquid_loops_and_conditions_are_in_mj_raw_tags: "Liquid-herhalingen en -voorwaarden staan in <mj-raw>-tags."
127
+ liquid_tags_can_t_go_into_a_translation_select_the_text_arou: "Liquid-tags ({% … %}) kunnen niet in een vertaling. Selecteer de tekst eromheen."
128
+ load_this_json: "Deze JSON laden"
129
+ loading: "Laden…"
130
+ loading_the_images: "Het laden van de afbeeldingen"
131
+ loading_the_translations_failed_status: "Het laden van de vertalingen is mislukt (%{status})"
132
+ loading_the_variables_failed_status: "Het laden van de variabelen is mislukt (%{status})"
133
+ locale_text: "%{locale}-tekst"
134
+ loop: "Herhaling"
135
+ make_translatable: "Vertaalbaar maken"
136
+ make_translatable_keep_the_selected_text_as_a_translation: "Vertaalbaar maken: de geselecteerde tekst als vertaling bewaren"
137
+ make_translatable_keep_the_selected_text_or_all_of_it_as_a_t: "Vertaalbaar maken: de geselecteerde tekst, of alles, als vertaling bewaren"
138
+ message: "Bericht"
139
+ middle: "Midden"
140
+ missing: "ontbreekt"
141
+ mobile: "Mobiel"
142
+ mode: "Modus"
143
+ move_up: "Omhoog"
144
+ name_can_t_go_here_its_type_blocks_don_t_fit: "%{name} kan hier niet: de blokken %{type} passen er niet in."
145
+ name_canvas: "%{name}-canvas"
146
+ name_doesn_t_fit_anywhere_yet_add_a_block_it_goes_in_first_o: "%{name} past nog nergens. Voeg eerst een blok toe waar het in kan, of sleep het naar het canvas."
147
+ name_doesn_t_fit_here_select_where_it_goes_first_or_drag_it: "%{name} past hier niet. Selecteer eerst waar het moet komen, of sleep het naar het canvas."
148
+ navbar: "Navigatiebalk"
149
+ network: "Netwerk"
150
+ new_tab: "Nieuw tabblad"
151
+ no_argument_for_names_in_the_t_filter: "Geen argument voor %{names} in het t-filter"
152
+ no_fonts_with_that_name: "Geen lettertypen met die naam"
153
+ no_images_yet: "Nog geen afbeeldingen"
154
+ no_languages_yet: "Nog geen talen"
155
+ no_variables_here: "Hier zijn geen variabelen"
156
+ nothing_matches: "Niets gevonden."
157
+ numbered_list: "Genummerde lijst"
158
+ off_word: "Uit"
159
+ on_word: "Aan"
160
+ open_in: "Openen in"
161
+ open_source: "%{source} openen"
162
+ open_where_it_s_kept: "Openen waar het staat"
163
+ padding: "Ruimte"
164
+ paragraph: "Alinea"
165
+ paragraph_style: "Alineastijl"
166
+ part_of_the_layout: "Onderdeel van de layout"
167
+ position: "Positie"
168
+ preview: "Voorbeeld"
169
+ preview_text: "Voorbeeldtekst"
170
+ preview_the_email_as_sent_with_liquid_tags: "Voorbeeld van de e-mail zoals die wordt verstuurd, met Liquid-tags"
171
+ radius: "Afronding"
172
+ redo_z: "Opnieuw (⇧⌘Z)"
173
+ remove: "Verwijderen"
174
+ remove_link: "Link verwijderen"
175
+ repeats_its_blocks_for_each_item_for_variable_in_collection: "Herhaalt zijn blokken voor elk item: {% for variable in collection %}."
176
+ replace: "Vervangen"
177
+ right: "Rechts"
178
+ right_to_left: "Rechts naar links"
179
+ same_tab: "Zelfde tabblad"
180
+ save: "Opslaan"
181
+ saving_the_translation_failed_status: "Het opslaan van de vertaling is mislukt (%{status})"
182
+ search_fonts: "Lettertypen zoeken"
183
+ section: "Sectie"
184
+ select_parent: "Bovenliggend blok selecteren"
185
+ select_the_text_to_translate_first: "Selecteer eerst de tekst om te vertalen."
186
+ show_panels: "Panelen tonen"
187
+ show_translations_in: "Vertalingen tonen in"
188
+ show_when: "Tonen als"
189
+ shown_after_the_subject_in_most_inboxes: "In de meeste inboxen getoond na het onderwerp."
190
+ shows_its_blocks_only_when_the_condition_is_true_if_expressi: "Toont zijn blokken alleen als de voorwaarde waar is: {% if expression %}."
191
+ social: "Sociale media"
192
+ solid: "Doorgetrokken"
193
+ spacer: "Witruimte"
194
+ strikethrough: "Doorhalen"
195
+ style: "Stijl"
196
+ subject: "Onderwerp"
197
+ text: "Tekst"
198
+ text_color: "Tekstkleur"
199
+ the_content_of_the_documents_using_this_layout_goes_here_wha: "Hier komt de inhoud van wat deze layout gebruikt. Wat je erin zet, is voorbeeldinhoud om de layout te ontwerpen."
200
+ the_document_edit_and_load_it_or_paste_one_in: "Het document. Bewerk en laad het, of plak er een in."
201
+ the_document_parts_of_it_are_locked_so_it_can_t_be_loaded_he: "Het document. Delen ervan zijn vergrendeld, dus het kan hier niet worden geladen."
202
+ the_email_could_not_be_compiled: "De e-mail kon niet worden gemaakt"
203
+ the_name_could_not_be_rendered: "%{name} kon niet worden weergegeven"
204
+ the_name_each_item_gets_e_g_line: "De naam die elk item krijgt, bijv. line."
205
+ the_upload: "Het uploaden"
206
+ theme: "Thema"
207
+ there_are_no_languages_to_translate_into_yet: "Er zijn nog geen talen om naar te vertalen."
208
+ there_is_a_name_already_a_document_has_one: "Er is al een %{name}; een document heeft er één."
209
+ there_s_nothing_here_yet: "Hier staat nog niets."
210
+ thickness: "Dikte"
211
+ this: "Dit"
212
+ too_narrow_to_split_the_panels: "Te smal om de panelen te verdelen"
213
+ top: "Boven"
214
+ translations: "Vertalingen"
215
+ type_the_text_to_translate_first: "Typ eerst de tekst om te vertalen."
216
+ typography: "Typografie"
217
+ underline_u: "Onderstrepen (⌘U)"
218
+ undo_z: "Ongedaan maken (⌘Z)"
219
+ upload: "Uploaden"
220
+ uploaded: "Geüpload"
221
+ uploading: "Uploaden…"
222
+ url: "URL"
223
+ variable: "Variabele"
224
+ variables: "Variabelen"
225
+ vertical: "Verticaal"
226
+ vertical_align: "Verticale uitlijning"
227
+ web: "Web"
228
+ what_to_loop_over_e_g_invoice_lines: "Waarover te herhalen, bijv. invoice.lines."
229
+ width: "Breedte"
230
+ wrapper: "Kader"
@@ -9,6 +9,11 @@ module TessEdit
9
9
  end
10
10
  end
11
11
 
12
+ # tess_edit_translations in every view, as the host renders the editor
13
+ initializer "tess_edit.helpers" do
14
+ ActiveSupport.on_load(:action_view) { include TessEdit::TranslationsHelper }
15
+ end
16
+
12
17
  initializer "tess_edit.importmap", before: "importmap" do |app|
13
18
  app.config.importmap.paths << root.join("config/importmap.rb")
14
19
  app.config.importmap.cache_sweepers << root.join("app/javascript")
@@ -1,3 +1,3 @@
1
1
  module TessEdit
2
- VERSION = "0.5.5"
2
+ VERSION = "0.5.7"
3
3
  end