rollup-plugin-drupal-interface-translations v1.1.1
Rollup Plugin for Drupal to Extract Interface Translations
This is a Rollup plugin that helps you to translation strings in JavaScript that are used in Drupal websites.
Based on DrupalTranslationsWebpackPlugin.
Installation
npm install --save-dev rollup-plugin-drupal-interface-translations
Usage
import drupalInterfaceTranslations from 'rollup-plugin-drupal-interface-translations';
// https://rollupjs.org/configuration-options/
export default {
input: 'main.js',
plugins: [drupalInterfaceTranslations()],
};
This plugin can be used with Vite.
import { defineConfig } from 'vite';
import drupalInterfaceTranslations from 'rollup-plugin-drupal-interface-translations';
// https://vitejs.dev/config/
export default defineConfig({
build: {
rollupOptions: {
input: 'main.js',
plugins: [drupalInterfaceTranslations()],
},
},
});
Options
filterOptions
Defines the files that are included in and excluded from interface translation extraction.
There are the parameters for the createFilter function in @rollup/pluginutils.
output
Type
: string
Default
: "translations/{MODULE_NAME}.pot"
The file path relative of the .pot (portable object template) file that this plugin will generate.
The Exploratorium is a 501(c)(3) nonprofit organization. Our tax ID #: 94-1696494
6 months ago
7 months ago
7 months ago
9 months ago
9 months ago
9 months ago
9 months ago
7 months ago
8 months ago
8 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
12 months ago
11 months ago
12 months ago
12 months ago
10 months ago
10 months ago
10 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago