Espaços reservados personalizados

Custom Placeholders are designed for cases when the source texts contain some less common placeholders that are not highlighted in the source strings (in the Editor) by default.

Configure your Custom Placeholders

Custom Placeholders could be configured in the Organization Settings > Custom placeholders page.

  1. You can find Organization Settings under the user icon in the top menu bar.
  2. Switch to the Custom placeholders page on the left menu bar and click Add Placeholder
  3. In the appeared dialog, specify a custom placeholder expression using the Expressions syntax elements and click Create.

Expression syntax elements

To configure your custom placeholder expression, you can use the elements from the table below. For example, if you’d like to highlight this [[Placeholder1]], your expression might look like this: start, then "[[", range "a,z,A,Z,0,9", limit "1,20", then "]]", end

To simplify things a bit, let’s deconstruct the expression above.

start – indicates the beginning of the expression.
then "[[" – means that your custom placeholder starts with two opening square brackets.
range "a,z,A,Z,0,9" – means that your custom placeholder might include characters ranging a-z and/or A-Z and/or 0-9.
limit "1,20" – means that the length of the placeholder is from 1 to 20 characters.
then "]]" – means that your custom placeholder ends with two closing square brackets.
end – indicates the end of the expression.

Element Aliases Descrição Usage examples
start startofline, start of line mark expression with ^
end end of, endofline mark the expression with $
then find add a string to the expression then "abc"
maybe define a string that might appear once or not maybe "abc"
palavra match any word that contains characters from a-z, A-Z, 0-9, including the _ (underscore) character
anything accept any string
range add a range to the expression range "a,z,0,9"
something accept any non-empty string
anythingbut anything but accept any string but the specified character anythingbut "abc"
anyof any, any of any of the listed characters anyof "abc"
somethingbut something but anything non-empty except for these characters somethingbut "abc"
limit add character limit limit "1,3"
linebreak line break, br match \r \n (might be used only with other elements)
tab match tabs \t (might be used only with other elements)

Assign custom placeholder to the project

  1. To assign the created custom placeholder to a project, navigate to the Project settings > Custom placeholders section and click Assign Custom placeholder.
  2. In the appeared dialog, select the placeholder from the Placeholder dropdown list and specify the desired order of placeholder execution (useful when you’d like to use multiple custom placeholders within one project), select whether you’d like your custom placeholders to be executed before the default placeholders and whether to allow your project participants to save translations without a placeholder and click Save.

Custom placeholders highlighting in the Editor

As soon as the custom placeholders are assigned to the project, project members will see them highlighted in the Editor during the translation process.

Este artigo foi útil?