-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
readme.txt
109 lines (73 loc) · 3.68 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
=== CSV Format for GlotPress ===
Contributors: pedromendonca
Donate link: https://github.com/sponsors/pedro-mendonca
Tags: WordPress, i18n, l10n, GlotPress, csv
Requires at least: 5.1
Tested up to: 6.6
Requires PHP: 7.4
Requires Plugins: glotpress
Stable tag: 1.0.3
License: GPLv2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Adds the CSV format to GlotPress to export/import translations and originals.
== Description ==
Adds the CSV format to GlotPress to export/import translations and originals.
This allows you to export a translation set to a CSV file, and use this to import the translations or originals into the project.
This plugin is properly prepared for localization.
== The CSV Format ==
The CSV output has values separated by `,` and enclosured by `" "`.
The total number of columns depends on the number of Plural Forms of the exported Locale.
For an sample file, please check out [example.csv](https://github.com/pedro-mendonca/GP-Format-CSV/blob/main/example.csv).
The header columns for the different translations have the `Translation (<plural-form>)` naming convention, being the Plural Forms depending on each exported Locale.
See the example below for a **Portuguese** CSV export, which has `2` plural forms.
= The exported CSV in plain text =
"Context","Singular","Plural","Comments","References","Translation (Singular)","Translation (Plural)"
"","Singular in English.","","Comment 1.\nComment 2.","","Singular em Português.",""
= The main columns =
The 5 main columns are `Context`, `Singular`, `Plural`, `Comments` and `References`.
= The Plural Forms variable columns =
The number of Plural Forms columns may vary depending on each Locale setting.
Check the below table for examples of [GlotPress Locales](https://github.com/GlotPress/GlotPress/blob/develop/locales/locales.php) from 1 to 6 Plural Forms.
== Included filters ==
The `gp_format_csv_header` allows you to add, remove or customize items from the CSV header.
The `gp_format_csv_row` allows you to add, remove or customize items from the CSV row.
== Usage ==
= Export translations to CSV =
1. Go to the bottom of the translation table.
2. Select `CSV (.csv)`.
3. Click on the `Export` link to download the CSV file.
= Import translations from CSV =
1. Go to the bottom of the translation table.
2. Click on the `Import Translations` link.
3. Select the CSV file to upload, the `Format` is *Auto Detected*.
4. Click on the `Import` button.
= Import originals from CSV =
1. Go to the project page.
2. On the project actions click on the `Import Originals` link.
3. Select the CSV file to upload, the `Format` is *Auto Detected*.
4. Click on the `Import` button.
== Frequently Asked Questions ==
= Can I help translating this plugin to my own language? =
Yes you can! If you want to translate this plugin to your language, please [click here](https://translate.wordpress.org/projects/wp-plugins/gp-format-csv).
= Can I contribute to this plugin? =
Sure! You are welcome to report any issues or add feature suggestions on the [GitHub repository](https://github.com/pedro-mendonca/GP-Format-CSV).
== Changelog ==
= 1.0.3 =
* Require WP 5.1.
* Tested with WordPress 6.6.
* Tested with GlotPress 4.0.1.
* Tested with PHP 8.3.
* Removed Git Updater forbiden plugin header.
* Fix docblock type param.
* Update dependencies.
= 1.0.2 =
* Tested with WordPress 6.5.
* Tested with GlotPress 4.0.
* Tested with PHP 8.3.
* Add WP Plugin Check CI test.
* Update dependencies.
= 1.0.1 =
* Fix log error message typo. Props @fxbenard.
= 1.0.0 =
* Initial release.
* All WPCS and PHPStan level 9 verified.