Tilpassede variabler

Tilpassede pladsholdere er til situationer, hvor kildeteksterne indeholder nogle mindre almindelige pladsholdere, som ikke er fremhævet i kildestrengene (i redigeringsværktøjet) som standard.

Opsæt de Tilpassede pladsholdere

You can manage Custom Placeholders in the Organization Settings.

  1. Click on your profile picture in the upper-right corner and select Organization Settings. Åbn Organisationsindstillinger
  2. Switch to the Custom placeholders page on the left menu bar and click Add Placeholder. Create Custom placeholder
  3. Angiv i den viste dialogboks et tilpasset pladsholderudtryk vha. Udtrykssyntakselselementerne og klik på Opret.

Tilpassede parametersyntakselementer

For at opsætte et tilpasset paameterudtryk kan elementerne fra udtrykssyntakstabellen benyttes. Vil man f.eks. gerne fremhæve denne [[Placeholder1]], kan udtrykket se sådan ud: start, derefter "[[", range "a,z,A,Z,0,9", limit "1,20", then "]]", end

For at forenkle tingene en smule, lad os dekonstruere udtrykket ovenfor.

start – angiver begyndelsen af udtrykket.
derefter "[[" – betyder, at den tilpassede pladsholder starter med tofirkantede åbningsparenteser.
-interval "a,z,A,Z,0, " – betyder, at den tilpassede pladsholder kan indeholde tegn i intervallet a-z og/eller A-Z og/eller 0-9.
grænse "1,20" – betyder, at pladsholderlængden er 1-20 tegn.
derefter "]]" – betyder, at den tilpassede pladsholder ender med to firkantede afslutningsparanteser.
ende – angiver slutningen af udtrykket.

Custom Placeholder Expression Examples

Below you can see a few examples of custom placeholder expression and how they will be highlighted in source strings in the Editor.

  • Custom placeholder enclosed in percent characters and curly brackets
    Expression: start, maybe "(", then "%", then "{", anything, then "}", maybe ")", then "%", end
    Argument delimiter: "
    String example: A test string with a custom %{placeholder}%

  • Custom placeholder enclosed in double square brackets
    Expression: start, then "[[", anythingbut "[[", then "]]", multiple, end
    Argument delimiter: "
    String example: A test string with a custom [[placeholder]]

  • Custom placeholder
    Expression: start, then "placeholder", end
    Argument delimiter: "
    String example: A test string with a custom placeholder

  • Custom placeholder enclosed in paragraph characters
    Expression: start, then "§", anything, then "§", end
    Argument delimiter: "
    String example: A test string with a custom §placeholder§

  • Long sentence that you might want to highlight as a single custom placeholder
    Expression: start, then "Long sentence that you might want to highlight as a single custom placeholder"
    Argument delimiter: "
    String example: A test string with a Long sentence that you might want to highlight as a single custom placeholder

Assign custom placeholder to the project

To assign the created custom placeholder to a project, follow these steps:

  1. Open your project and go to Settings > Import.
  2. Click Assign Custom placeholder.
  3. In the appeared dialog, select a placeholder from the Placeholder drop-down 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, whether to allow your project participants to save translations without a placeholder, assign to all or specified formats, and click Save.

Custom placeholders highlighting in the Editor

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

Var denne artikel nyttig?