Skip to content

Commit 2bb03b8

Browse files
docs: better documentation for the branch option (#146)
1 parent 840fc4b commit 2bb03b8

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

README.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,10 @@ files:
122122

123123
Use `preserve_hierarchy` if your project contains multiple modules that you want to localize with the same source file names.
124124

125-
> **Note:**
125+
> [!WARNING]
126126
> Both `source` and `translation` keys should be specified.
127127

128-
> **Note:**
128+
> [!NOTE]
129129
> If `preserve_hierarchy` is set to `true`, the plugin will add the path to your translation pattern.
130130
>
131131
> ```yml
@@ -139,6 +139,19 @@ Use `preserve_hierarchy` if your project contains multiple modules that you want
139139

140140
#### Additional properties
141141

142+
##### Branch
143+
144+
If you are using the branching functionality in Crowdin, you can specify the branch name in the configuration file:
145+
146+
```yml
147+
branch: main
148+
```
149+
150+
Alternatively, you can enable the [Use Git Branch](#use-git-branch) option in the plugin settings to use the local git branch name as the Crowdin branch name.
151+
152+
> [!WARNING]
153+
> For **string-based** projects, the branch name must be specified either in the configuration file or in the plugin settings.
154+
142155
##### File properties
143156

144157
To attach labels to the uploaded strings, use `labels`:
@@ -201,10 +214,10 @@ translate_hidden: true
201214

202215
See the [Placeholders](https://support.crowdin.com/configuration-file/#placeholders) article to put appropriate variables.
203216

204-
> **Note:**
217+
> [!TIP]
205218
> `%android_code%` placeholder means a format such as `'fr-rCA'` ([<ISO 639-1>](http://www.loc.gov/standards/iso639-2/php/code_list.php) -r[<ISO 3166-1-alpha-2>](https://www.iso.org/obp/ui/#iso:pub:PUB500001:en)). When applying format with only two-letter language code such as `'fr'`([<ISO 639-1>](http://www.loc.gov/standards/iso639-2/php/code_list.php)) format, use `%two_letters_code%` placeholder.
206219

207-
> **Note:**
220+
> [!WARNING]
208221
> Currently, the `%original_path%` placeholder is not supported.
209222

210223
### Plugin settings
@@ -226,7 +239,8 @@ You can also set a specific branch name to work with by using the `branch` optio
226239

227240
If you are not using branching, make sure the `Use Git Branch` option is disabled and `branch` is not defined in the `crowdin.yml` file.
228241

229-
Note that a **branch is required for string-based** projects.
242+
> [!WARNING]
243+
> For **string-based** projects, the branch name must be specified either in the configuration file or in the plugin settings.
230244

231245
#### Automatic uploads
232246

0 commit comments

Comments
 (0)