Parser Configuration Settings
Varsayılan olarak Crowdin, desteklenen her dosya biçimi için ön tanımlı bir dizi içe ve dışa aktarma parametresi kullanır.
Ayrıştırıcı yapılandırması özelliği, Crowdin tarafından desteklenen dosya biçimleri için önceden tanımlanmış varsayılan içe ve dışa aktarma davranışını değiştirmenize izin verir. Belirli bir projedeki ayrıştırıcı yapılandırması, sadece bu projede depolanan dosyalara uygulanır.
Ayrıştırıcı yapılandırmasını belirli bir biçimdeki tüm dosyalar veya tek dosyalar için ayarlayabilirsiniz. Bir dosya biçimi için ayrıştırıcı yapılandırmasını kaydettikten sonra, kaynak dosyaları projenize yükleyebilirsiniz ve Crowdin ayarlarınızı buna göre uygulayacaktır.
Şu biçimler için içe ve dışa aktarma davranışını yapılandırabilirsiniz: Java Properties, Genel XML, DITA, AsciiDoc, Düz metin, MadCap Flare, HTML, Office belgeleri, Adobe FrameMaker, Adobe InDesign, Markdown ve MediaWiki.
Bazı parametreler tüm biçimlerde ortakken diğerleri biçime özgüdür. Aşağıdaki tabloda, kullanılabilir ayrıştırıcı parametrelerini ve yapılandırılabilecekleri biçimleri görebilirsiniz.
| Parameter | Description | Format |
|---|---|---|
| Content segmentation | On import, the source file’s content will be split into shorter text segments using predefined segmentation rules (SRX 2.0). | Generic XML, DITA, AsciiDoc, MadCap Flare, HTML, Office documents, Adobe FrameMaker, Adobe InDesign, Markdown |
| Custom segmentation rules | Defines your own segmentation rules. Read more about Custom Segmentation. | Generic XML, DITA, AsciiDoc, Plain text, MadCap Flare, HTML, Office documents, Adobe FrameMaker, Adobe InDesign, Markdown, MediaWiki |
| Excluded elements | Defines a list of CSS style selectors for elements that should not be available for translation (e.g., code, pre > code, .code-block). Applicable only to block elements. Inline elements are ignored. | HTML, HTML (with front matter) |
| Inline tags | Defines a list of tags that should be treated as inline rather than block elements (for example, item, list). The text inside an inline tag stays part of the string around it. | Generic XML, HTML, HTML (with front matter), Markdown, WebXml |
| Hide Attribute Values | HTML attributes such as src, href, and data will be imported as hidden strings, so they aren’t shown to translators. | HTML, HTML (with front matter), WebXml |
| Excluded front matter elements | Defines a list of front matter elements that should not be available for translation (e.g., keywords, “internal.description”, tags). The path elements should be delimited by a period. The keys containing a period must be enclosed in quotation marks. | HTML (with front matter), Markdown, MDX |
| Front matter export quotes | Defines how front matter values are quoted in exported files. Default quotes only the values that contain a colon, and the other two options quote every value, in single or double quotes. | Markdown |
| Exclude code blocks | Defines whether to import code blocks. Applicable only to code blocks. Inline elements with code are ignored. | Markdown, MDX |
| Strong marker | Defines the marker used for strong text in exported files, either Asterisk (*) or Underscore (_). | Markdown, MDX |
| Emphasis marker | Defines the marker used for emphasized text in exported files, either Asterisk (*) or Underscore (_). | Markdown, MDX |
| Unordered list bullet | Defines the character that starts each unordered list item in exported files: Dash (-), Asterisk (*), or Plus (+). | Markdown, MDX |
| Table formatting | Defines how table columns are formatted in exported files. Evenly distribute cells pads each column to its longest value, and Consolidate leaves one space on either side of every value. | Markdown, MDX |
| Translate content | Texts stored inside the tags will be available for translation. | Generic XML |
| Translate attributes | Tag attributes will be available for translation. | Generic XML |
| Translatable elements | Defines the specific nodes and attributes to be available for translation. | Generic XML |
| Escape single quote | Defines the behavior regarding a single quote escaping in exported translations.
| Java Properties |
| Escape special characters | Any special characters (i.e., | Java Properties |
| Export quotes | Defines whether exported strings are enclosed in single or double quotes. | JavaScript |
| Skip Include Directives | include:: directives will be left unprocessed, so the content of the files they point to stays out of this file. Useful when those files are uploaded to Crowdin on their own and their text is already translated there. | AsciiDoc |
| Extract hyperlink text inline | The text of a hyperlink will be extracted together with the sentence around it, so translators see it in context instead of as a separate, non-editable tag. | Adobe InDesign |
| Convert to ICU MessageFormat | Placeholders will be converted to ICU MessageFormat syntax on import. | Steamworks Localization |
| Tag variables with “_gender” when converting VDF Gender syntax to ICU Select | A _gender suffix will be added to variable names when gender syntax is converted. Available when Convert to ICU MessageFormat is enabled. | Steamworks Localization |
| Import identifier (key) as source string | When a file has no source text for a string, its identifier will be imported as the source string. | String Catalog |
| Import translations | Translations already stored in the file will be imported along with the source strings. | String Catalog |
| Clean tags aggressively | Additional formatting tags related to text spacing will be removed on import. Useful when translating Office documents converted from other formats (for example, PDF), and the conversion introduced lots of unnecessary formatting tags. | Office documents, Microsoft Visio |
| Translate hyperlink URLs | Hyperlink URLs will be available for translation. | Office documents, Microsoft Visio |
Belirli Bir Biçimdeki Tüm Proje Dosyaları için Ayrıştırıcı Yapılandırması
Bölüm başlığı “Belirli Bir Biçimdeki Tüm Proje Dosyaları için Ayrıştırıcı Yapılandırması”Belirli bir biçimdeki tüm dosyalar için tercih edilen ayrıştırıcı yapılandırmasını ayarlamak için şu adımları izleyin:
- Projenizi açın ve Ayarlar > Ayrıştırıcı yapılandırması’na gidin.
- Choose the needed file format and click Edit.
- Tercih edilen ayarları ayarlayın.
- Kaydet’e tıklayın.
Alternatif olarak, yapılandırılabilir ayrıştırıcı ayarlarına sahip biçimler için aynı ayarları Paket oluştur veya Paketi düzenle ileti öğesinde hedef biçimin yanındaki simgesine tıklayarak açabilirsiniz.
To add a new file format, click Add Apps and install the required format.
Bazı durumlarda, ayrıştırıcı yapılandırmasını bazı dosya biçimlerindeki tüm dosyalar için değil, sadece tek bir dosya için ayarlamanız gerekebilir. Tek bir dosya için ayrıştırıcı yapılandırmasını ayarlamak için şu adımları izleyin:
- Open your project and go to Sources > Files.
- Gerekli dosyaya çift tıklayın.
- Görünen ileti öğesinde, Ayrıştırıcı yapılandırması sekmesine geçin.
- Tercih edilen ayarları ayarlayın.
- Kaydet’e tıklayın.
Dosya ayrıştırıcı yapılandırmasını kaydettikten sonra, Crowdin bu dosyayı yeniden içe aktaracak ve ayarlarınızı uygulayacaktır.
Crowdin’de dosya yönetimi hakkında daha fazlasını okuyun.
Sometimes, you might work with files that contain strings in a different format. A common example is a JSON file where some string values contain HTML content. The standard parser configuration isn’t designed for these nested or cascading scenarios.
To properly process such files, you need to implement a custom Crowdin App that uses the File Post-Import Processing Module. Bazen basamaklı işleme olarak da adlandırılan bu yöntem, uygulamanızın içe aktarılan dizgilere müdahale etmesine ve Crowdin’e belirli dizgileri farklı bir ayrıştırıcı kullanarak yeniden işlemesi talimatını vermesini sağlar. Örneğin, Crowdin’e bir JSON dosyasındaki bir dizgiyi HTML olarak ayrıştırmasını söyleyebilir, böylece HTML etiketlerinin doğru bir şekilde işlendiğinden ve çevirmenlere düz metin olarak gösterilmediğinden emin olabilirsiniz.
To handle files with nested content, you can install the Cascade Importer from the Crowdin Store or, for more custom scenarios, build your own.