https://github.com/front/drupal-gutenberg-translations
Command line to generate a translations file compatible with Drupal.
https://github.com/front/drupal-gutenberg-translations
Last synced: 4 months ago
JSON representation
Command line to generate a translations file compatible with Drupal.
- Host: GitHub
- URL: https://github.com/front/drupal-gutenberg-translations
- Owner: front
- Created: 2019-11-07T12:00:32.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-03-25T18:10:29.000Z (about 4 years ago)
- Last Synced: 2025-09-16T14:15:50.206Z (9 months ago)
- Language: JavaScript
- Size: 13.7 KB
- Stars: 2
- Watchers: 7
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🏳 Drupal Gutenberg Translations
Command line to generate a translations file compatible with Drupal.
It retrieves all translations strings from Gutenberg `__()`, `_n()`, `_x()` and `_nx()` translation function calls and generates equivalent `Drupal.t()` and `Drupal.formatPlural()` calls.
A new translations file `drupal-gutenberg-translations.js` will be created at the given target path.
## Overview
Install it:
```
npm i drupal-gutenberg-translations --save-dev
```
or globally:
```
npm i -g drupal-gutenberg-translations
```
To generate `drupal-gutenberg-translations.js` file:
```
npx drupal-gutenberg-translations [target path]
```