-
-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract front-end translatable strings #2753
Merged
magicznyleszek
merged 8 commits into
master
from
2752-extract-front-end-translatable-strings
Nov 14, 2020
Merged
Extract front-end translatable strings #2753
magicznyleszek
merged 8 commits into
master
from
2752-extract-front-end-translatable-strings
Nov 14, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
in anticipation of using `webpack.ProvidePlugin`
using `webpack.ProvidePlugin`
webpack-extract-translation-keys can extract them
strings to jsapp/compiled/extracted-strings.json; add webpack-extract-translation-keys-plugin as new dependency; concatenate elements of arrays in webpack dev/prod configurations to arrays in the common configuration instead of discarding the common arrays
jnm
force-pushed
the
2752-extract-front-end-translatable-strings
branch
from
August 13, 2020 07:52
c842330
to
ccfbcec
Compare
magicznyleszek
requested changes
Aug 13, 2020
…end-translatable-strings
@jnm do you want to fix the merge conflict? (and one thing from review :-P) |
# Conflicts: # jsapp/js/components/table.es6 # jsapp/js/editorMixins/assetNavigator.es6 # jsapp/xlform/src/mv.skipLogicHelpers.coffee # jsapp/xlform/src/mv.validationLogicHelpers.coffee # jsapp/xlform/src/view.row.templates.coffee # jsapp/xlform/src/view.rowDetail.SkipLogic.coffee # jsapp/xlform/src/view.rowSelector.templates.coffee # jsapp/xlform/src/view.surveyApp.templates.coffee
magicznyleszek
approved these changes
Nov 14, 2020
magicznyleszek
deleted the
2752-extract-front-end-translatable-strings
branch
November 14, 2020 01:15
magicznyleszek
added a commit
that referenced
this pull request
Nov 16, 2020
also defines jquery as global
magicznyleszek
added a commit
that referenced
this pull request
Nov 16, 2020
also defines jquery as global
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…to the file
jsapp/compiled/extracted-strings.json
whennpm run build
/webpack --config webpack/prod.config.js
is executed. Going forward:t()
must be the function call used to surround translatable strings, i.e. do not assignt
to another variable and expect string extraction to continue working;t()
only with static strings;t()
manually anywhere, e.g.import {t} from './utils'
must be avoided:t()
is now provided globally bywebpack.ProvidePlugin
.Description
Extract all translatable strings from front-end code to a single file, with the eventual goal of automatically updating Transifex
Related issues
Closes #2752