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
Currently the placeholders have no particular visual adds.
While trying to add some simple CSS the placeholders, found that some aren't even matched.
Matched placeholders
There are a few currently matched placeholder patterns, all start with % and end with it's type (s, d, l, etc.).
There are a few optional parameters: can be with or without index (eg.: %s or %1$s), and with or without minimum width (eg.: %1$s or %1$1s, less used, but also supported).
No indexed placeholders:
%s (s: string)
%d (d: integer)
%l (l: list)
%1s, %2s, %3s, %10s, %20s, %30s, etc (The integer is the minimum width of the placeholder. The type can be s, d, l, etc.) *
Indexed placeholders:
%1$s (s: string)
%d (d: integer)
%l (l: list)
%1$1s, %1$2s, %1$3s, %1$10s, %1$20s, %1$30s, etc (The 1$ is index. The integer after the index is the minimum width of the placeholder. The type can be s, d, l, etc.)
* The pattern of no indexed placeholders with minimum width set isn't currently matched. Needs a fix.
Visibility
Would be great to add some visual notation to easily spot placeholders.
Currently the placeholders are shown without any visual adds.
Suggestion of some visual adds to easily spot placeholders, with specific class and simple CSS.
The text was updated successfully, but these errors were encountered:
Like the second screenshot from Pedro, it highlights the placeholders quite well. But what's handy, it also shows a list underneath the editor which placeholders were already added and which ones not. You can also click on them, to insert them at your current location in the editor which is also helpful.
Now, why not also implement this for HTML tags or things that are between [] ?
Also, if we are going to implement this on translate.wp.org ... we need to look at Openverse that's using ###placeholder###
I can totally agree with the fact if we look at all of these other types of placeholders that the scope of this enhancement is going through the roof... Besides, one type of placeholders can be very handy too.
Currently the placeholders have no particular visual adds.
While trying to add some simple CSS the placeholders, found that some aren't even matched.
Matched placeholders
There are a few currently matched placeholder patterns, all start with
%
and end with it's type (s
,d
,l
, etc.).There are a few optional parameters: can be with or without index (eg.:
%s
or%1$s
), and with or without minimum width (eg.:%1$s
or%1$1s
, less used, but also supported).No indexed placeholders:
%s
(s: string)%d
(d: integer)%l
(l: list)%1s
,%2s
,%3s
,%10s
,%20s
,%30s
, etc (The integer is the minimum width of the placeholder. The type can bes
,d
,l
, etc.) *Indexed placeholders:
%1$s
(s: string)%d
(d: integer)%l
(l: list)%1$1s
,%1$2s
,%1$3s
,%1$10s
,%1$20s
,%1$30s
, etc (The1$
is index. The integer after the index is the minimum width of the placeholder. The type can bes
,d
,l
, etc.)*
The pattern of no indexed placeholders with minimum width set isn't currently matched. Needs a fix.Visibility
Would be great to add some visual notation to easily spot placeholders.
Currently the placeholders are shown without any visual adds.
Suggestion of some visual adds to easily spot placeholders, with specific class and simple CSS.
The text was updated successfully, but these errors were encountered: