You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1790e42
Browse filesBrowse the repository at this point in the historyBrowse files
Translate the setup checklist and the trunk update banners
The checklist, the trunk update card, the question an update asks over edits,
and the banners for an old trunk, an incomplete update and a finished one are
wrapped, with the sentences they take from setup-steps, update-plan,
next-action and project-type's setup copy. Module-level strings become
functions or getters so they are translated when shown, and sentences built
from parts become whole ones: the step counters, the file count, the update
summary and the link-ticket hint, which now takes the work item's kind instead
of splicing in its label.
Fixes#626.
// What the setup checklist says about the steps that differ per target.
73
+
// Getters, like `description`, so each is translated when it is read.
73
74
setup: {
74
-
cloneLabel: 'Download WordPress development version',
75
-
cloneDescription: 'Clone the WordPress develop repository.',
76
-
buildDescription: 'Compile WordPress Core to generate the dist files. Later updates rebuild automatically.',
77
-
builtDescription: 'Built. Edited files in src/ since? Run npm run build in the Terminal so the site picks them up — updates and applied patches rebuild on their own.',
78
-
serverDescription: 'Launch the development server once to complete the WordPress setup wizard.'
75
+
getcloneLabel(){return__('Download WordPress development version');},
76
+
getcloneDescription(){return__('Clone the WordPress develop repository.');},
77
+
getbuildDescription(){return__('Compile WordPress Core to generate the dist files. Later updates rebuild automatically.');},
78
+
getbuiltDescription(){
79
+
// translators: 1: a folder, src/. 2: the build command, npm run build.
80
+
returnsprintf(__('Built. Edited files in %1$s since? Run %2$s in the Terminal so the site picks them up — updates and applied patches rebuild on their own.'),'src/','npm run build');
81
+
},
82
+
getserverDescription(){return__('Launch the development server once to complete the WordPress setup wizard.');}
79
83
},
80
84
81
85
// What the site page's cards say where the two targets differ. The
@@ -207,11 +211,14 @@ const PROJECT_TYPES = {
207
211
},
208
212
209
213
setup: {
210
-
cloneLabel: 'Download Gutenberg',
211
-
cloneDescription: 'Clone the Gutenberg repository.',
212
-
buildDescription: 'Compile the Gutenberg packages. Later updates rebuild automatically.',
213
-
builtDescription: 'Built. Edited a package since? Run npm run build in the Terminal so the site picks it up; updates rebuild on their own.',
214
-
serverDescription: 'Launch a WordPress with this checkout as its Gutenberg plugin, once, to finish the setup.'
214
+
getcloneLabel(){return__('Download Gutenberg');},
215
+
getcloneDescription(){return__('Clone the Gutenberg repository.');},
216
+
getbuildDescription(){return__('Compile the Gutenberg packages. Later updates rebuild automatically.');},
217
+
getbuiltDescription(){
218
+
// translators: %s: the build command, npm run build.
219
+
returnsprintf(__('Built. Edited a package since? Run %s in the Terminal so the site picks it up; updates rebuild on their own.'),'npm run build');
220
+
},
221
+
getserverDescription(){return__('Launch a WordPress with this checkout as its Gutenberg plugin, once, to finish the setup.');}
215
222
},
216
223
217
224
// 'plugin-mount', Gutenberg is a plugin, so Playground boots a stock
setDirtyError(`Saved your changes to ${res.filePath}, but resetting the working tree failed: ${d&&d.error ? d.error : 'Unknown error'}`);
264
+
// translators: 1: the path of the saved patch file. 2: why the reset failed.
265
+
setDirtyError(sprintf(__('Saved your changes to %1$s, but resetting the working tree failed: %2$s'),res.filePath,d&&d.error ? d.error : __('Unknown error')));
0 commit comments