You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/enterprise/organization-management/settings/custom-placeholders.mdx
+21-4Lines changed: 21 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ import customPlaceholderExpression from '!/enterprise/organization-management/cu
11
11
12
12
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.
13
13
14
-
## Configure your Custom Placeholders
14
+
## Configure Your Custom Placeholders
15
15
16
16
You can manage Custom Placeholders in the **Organization Settings**.
17
17
@@ -28,7 +28,7 @@ You can manage Custom Placeholders in the **Organization Settings**.
28
28
29
29
Once the custom placeholders are assigned to the project, project members will see them highlighted in the Editor during the translation process.
30
30
31
-
## Custom placeholders syntax elements
31
+
## Understanding the Syntax: A Simple Example
32
32
33
33
To configure your custom placeholder expression, you can use the elements from [the expression syntax table](/enterprise/expression-syntax-elements/).
34
34
@@ -62,7 +62,7 @@ To simplify things a bit, let's deconstruct the expression above.
62
62
/>
63
63
</CardGrid>
64
64
65
-
## Custom Placeholder expression examples
65
+
## Custom Placeholder Expression Examples
66
66
67
67
Below you can see a few examples of custom placeholder expression and how they will be highlighted in source strings in the Editor.
68
68
@@ -84,6 +84,16 @@ Expression:
84
84
start, maybe"(", then"%", then"{", anything, then"}", maybe")", then"%", end
85
85
```
86
86
87
+
This expression deconstructed:
88
+
89
+
*`maybe "("`– Allows the placeholder to optionally start with a `(`.
90
+
*`then "%"`– Requires a `%` character.
91
+
*`then "{"`– Requires a `{` character.
92
+
*`anything`– Matches any character or sequence of characters inside the placeholder.
93
+
*`then "}"`– Requires a `}` character.
94
+
*`maybe ")"`– Allows the placeholder to optionally end with a `)`.
95
+
*`then "%"`– Requires a `%` character.
96
+
87
97
##### Custom placeholder enclosed in double square brackets
88
98
89
99
String example:
@@ -98,6 +108,13 @@ Expression:
98
108
start, then"[[", anythingbut"[[", then"]]", multiple, end
99
109
```
100
110
111
+
This expression deconstructed:
112
+
113
+
*`then "[["`– Requires the placeholder to start with `[[`.
114
+
*`anythingbut "[["`– Matches any character *except* the opening `[[` brackets.
115
+
*`then "]]"`– Requires the placeholder to end with `]]`.
116
+
*`multiple`– Allows the pattern (the content inside the brackets) to repeat.
117
+
101
118
##### Custom placeholder
102
119
103
120
String example:
@@ -137,5 +154,5 @@ A test string with a Long sentence that you might want to highlight as a single
137
154
Expression:
138
155
139
156
```graphql wrap
140
-
start, then"Long sentence that you might want to highlight as a single custom placeholder"
157
+
start, then"Long sentence that you might want to highlight as a single custom placeholder", end
0 commit comments