HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux wordpress-ubuntu-s-2vcpu-4gb-fra1-01 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64
User: root (0)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/delta/wp-content/plugins/wpml-string-translation/locale/translating-javascript-strings.md
# 1. Preparation

1. Run `npm install`.
2. For good measure, in the `package.json`, run this check:
    1. Look for occurrences of `GETTEXT_DOMAIN=`.
    2. Check that, after the "=" there is the current plugin's text domain (e.g. `sitepress` for wpml-core). If not, fix it.
3. Check that the `.gitignore` file of the project contains this line: `/locale/jed/**/*.po`.

Note that, since WPML-Core embeds Translation Management as a Composer plugin, in `package.json`, you must have two occurrences of `GETTEXT_DOMAIN`: one for Core and another for TM.

# 2. Generating or updating the POT files

Run `npm run strings:update-pot`.

This command will generate or update the POT files for each JS app in `/locale/jed/pot`.

You can send these files for translation.

# 3. Updating the translations

1. Save the completed translations in `/locale/jed/po`.
2. Run `npm run strings:jed`  to generate the JED files in `/locale/jed`.
3. Test the translations.
4. Commit the changes.

# 4. Additional notes

When committing the changes, you should only commit the POT and JED files (respectively, ``/locale/jed/pot/*.pot` and `/locale/jed/*.json`).