VCS-integrationer: Opsætning online

To configure a Version Control System integration, specify which source files should be translated and how Crowdin should structure the translated files in your repository.

Grenopsætning

Once you selected your repository and branch for translation, the next step you need to do is to configure the selected branch. Click to open the Branch Configuration dialog and start the configuration. In the Branch Configuration dialog, you can either load the existing configuration file stored on your repository or create a new configuration from scratch.

Integrationsopsætning

Indlæsning af en Opsætning

To load the existing configuration file stored on your repository, follow these steps:

  1. Click Load configuration.
  2. Angiv navnet på opsætningsfilen fra dit lager.
  3. Klik på Fortsæt.

Indlæser opsætning

The configuration will be displayed in the Branch Configuration dialog. You can use it as is or modify it if needed.

Oprettelse af en Opsætning

To create a new configuration file that will be used by the integration, specify the preferred name and click Continue in the Branch Configuration dialog.

Grenopsætning

Then specify the source and translated file paths using patterns and placeholders listed below. In the right panel, you can preview the structure of the source files that will be uploaded for translation and the structure of the translated files based on the specified paths.

Once you finish setting up the configuration for the selected branch and save the changes, the configuration file will be saved to the root of the translation branch in your repository.

Mønstre

* (stjerne)

Represents any character in the file or directory name. Angives en “*.json”, vil den indeholde alle filer, såsom “messages.json”, “about_us.json”, og alt af filtypen “.json”.

*** (dobbeltstjerne)

Matcher enhver streng rekursivt (inkl. undermapper). Bemærk, at *** kan benyttes i både kilde- og oversættelsesmønstre. When using ** in the translation pattern, it will always contain a sub-path from the source for a certain file. Der kan f.eks. benyttes kilden: ‘/da/*.po’ for rekursivt at uploade alle *.po-filer til Crowdin. Oversættelsesmønsteret vil være ‘/%two_letters_code%/\/%original_file_name%’.

? (spørgsmålstegn)

Matcher ethvert enkelttegn.

[set]

Matcher ethvert enkelttegn i et sæt. Opfører sig nøjagtig som tegnsæt i Regexp, herunder negation ([^a-z]).

\ (omvendt skråstreg)

Escaper det næste metategn.

Pladsholdere

Benyt pladsholdere til at fasslå, hvor oversatte filer blive placeret, og hvorledes de vil blive navngivet:

Navn Beskrivelse
%original_file_name% Oprindeligt filnavn
%original_path% Benyt overordnede mappers navne i Crowdin-projektet til at generere filstien i det resulterende bundt
%file_extension% Oprindeligt filtypenavn
%file_name% Filnavn uden fiíltypeangivelse
%language% Language name (e.g., Ukrainian)
%two_letters_code% Language code ISO 639-1 (e.g., uk)
%three_letters_code% Language code ISO 639-2/T (e.g., ukr)
%locale% Locale (e.g., uk-UA)
%locale_with_underscore% Locale (e.g., uk_UA)
%android_code% Android Landestandard-ID benyttes ved navngivning af "værdier"-mapper
%osx_code% OS X-landestandard-ID benyttet ved navngivning af ".lproj"-mapper
%osx_locale% OS X locale used to name translation resources (e.g., uk, zh-Hans, zh_HK)

Avancerede Indstillinger

Ignorering af filer

If some files shouldn’t be translated, click Add ignored pattern, specify the respective pattern for these files, and Crowdin won’t upload specific files for translation.

Ignorere filer eller mapper

Sprogtilknytning

If your project uses custom names for locale directories, you can use Language Mapping to map your own languages to be recognized by Crowdin.

Følg disse trin for at tilføje sprogmapping:

  1. Klik på Sprogmapping. Language mapping
  2. Select the necessary language and a placeholder.
  3. Specify your custom code.
  4. Klik på Tilføj mapping for at tilføje en anden tilpasset kode.
  5. Klik på Gem. Language mapping

Opsætning af regneark

You can specify the scheme of your spreadsheet file in the Scheme field. To form the scheme for your CSV or XLS/XLSX file, use the following constants:

identifier – Column contains string identifiers. source_phrase – Column contains source strings. source_or_translation – Column contains source strings, but the same column will be filled with translations when the file is exported. When uploading existing translations, the values from this column will be used as translations. translation – Column contains translations. context – Column contains comments or context information for the source strings. max_length – Column contains max.length limit values for the translations of the strings. labels – Column contains labels for the source strings. none – Column that will be skipped on import.

Scheme example: identifier,source_phrase,context,fr,de,it,uk (Language Codes).

If a spreadsheet contains the translations for multiple target languages, select Multilingual spreadsheet. If you don’t want to translate the text stored in the first row, select Import first line as a header.

Regnearksfil

Opsætning af XML-filer

XML-filer

Oversæt indhold Select to translate texts stored inside the tags.
Oversæt attributter Select to translate tag attributes.
Indholdssegmentering Select to split the source XML file's content into shorter text segments.
Important! This option disables the possibility to upload existing translations for XML files.
Oversætbare elementer Dette er en matrix af strenge, hvori hvert element er XPaths tilet DOM-element, der skal importeres.
Eksempelsti: /sti/til/node eller /sti/til/attribut[@attr]

Yderligere parametre

Flge. parametre kan ikke opsættes online:

  • preserve_hierarchy - gemmer mappestrukturen i Crowdin
  • dest - giver mulighed for at angive et filnavn i Crowdin
  • type - giver mulighed for at angive en filtype i Crowdin
  • update_option - beholder oversættelser og beholder/fjerner godkendelser fra de ændrede strenge under filopdateringen
  • commit_message - additional commit message that can include Git tags
  • export_languages - eksportér oversættelser for de angivne sprog

Once you save the online configuration, a crowdin.yml file will be saved to the root of the configured branch in your repository. Du kan redigere denne fil manuelt for at tilføje de ønskede parametre.

Læs mere om opsætningsfilen.

Gemme opsætning

Klik på Gem for at forhåndsvise den oprettede opsætnong.

Gem opsætning

Click Add File Filter if you have various file groups with different configurations.

If several branches in the project share the same configuration, and the same filters should be applied to them, select Apply filters to all translatable branches.

Klik på Gem for at gemme den oprettede opsætnong.

Anvend filtre på alle oversætbare grene

When the configuration is saved, the localizable files will start uploading to your Crowdin project.

Synk kører

Se også

Var denne artikel nyttig?