For at opsætte en Versionskontrolsystemintegration, så angiv hvilke kildefiler, som skal oversættes, samt hvordan Crowdin skal strukturere de oversatte filer i repo’et.
Når depotet og grenen til oversættelse er valgt, er skridt at opsætte den valgte gren. Klik på for at åbne dialogen Grenopsætning og påbegynde opsætningen. I dialogen Grenopsætning, kan man enten indlæse en eksisterende opsætningsfil fra depotet eller oprette en ny fra bunden.
If you’d like your VCS integration to work in the Target File Bundles Mode, you need to configure target file bundles for each branch you selected for translation.
Read more about configuring target file bundles for VCS integration.
To load the existing configuration file stored on your repository, follow these steps:
The configuration will be displayed in the Branch Configuration dialog. You can use it as is or modify it if needed.
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.
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.
* (asterisk)
Represents any character in the file or directory name. If you specify a “*.json” it will include all files like “messages.json”, “about_us.json” and anything that ends with “.json”.
** (doubled asterisk)
Matches any string recursively (including sub-directories). Note that you can use ** in both source and translation patterns. When using ** in the translation pattern, it will always contain a sub-path from the source for a certain file. For example, you can use source: ‘/en/**/*.po’ to upload all *.po files to Crowdin recursively. The translation pattern will be ‘/%two_letters_code%/**/%original_file_name%’.
? (question mark)
Matches any single character.
[set]
Matches any single character in a set. Behaves exactly like character sets in Regexp, including set negation ([^a-z]).
\ (backslash)
Escapes the next metacharacter.
Use placeholders to identify where translated files will be placed and how they will be named:
Navn | Beskriveslse |
---|---|
%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% | Sprognavn (f.eks. Dansk) |
%two_letters_code% | Sprogkode ISO 639-1 (f.eks.. da) |
%three_letters_code% | Sprogkode ISO 639-2/T (f.eks. dan) |
%locale% | Landestandard (f.eks. da-DK) |
%locale_with_underscore% | Landestandard (f.eks. da_DK) |
%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-landestandard benyttet til navngivning af oversættelsesressourcer (f.eks. uk, zh-Hans, zh_HK) |
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.
If your project uses custom names for locale directories, you can use Language Mapping to map your own languages to be recognized by Crowdin.
To add language mapping, follow these steps:
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. Når eksisterende oversættelser uploades, bruges dataene fra denne kolonne som oversættelser. 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.
Oversæt indhold | Vælg, for at oversætte tekster placeret i tags. |
Oversæt attributter | Vælg, for at oversætte tag-attributter. |
Indholdssegmentering | Vælg, for at opdele kilde XML-filens indhold i kortere tekstsegmenter. Bemærk: Når Indholdssegmentering er aktiveret, håndteres oversættelsesupload af en eksperimentel maskinlæringsteknologi. |
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] |
The following parameters can’t be configured online:
preserve_hierarchy
- gemmer mappestrukturen i Crowdindest
- giver mulighed for at angive et filnavn i Crowdintype
- giver mulighed for at angive en filtype i Crowdinupdate_option
- beholder oversættelser og beholder/fjerner godkendelser fra de ændrede strenge under filopdateringencommit_message
- ekstra commit-besked, der kan omfatte Git-tagsexport_languages
- eksportér oversættelser for de angivne sprogOnce you save the online configuration, a crowdin.yml
file will be saved to the root of the configured branch in your repository. You can edit this file manually to add the necessary parameters.
Read more about the configuration file.
Click Save to preview the created configuration.
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.
Click Save to save the created configuration.
When the configuration is saved, the localizable files will start uploading to your Crowdin project.