mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
Translate "Loading..." text in inline comments
Summary: Ref T12616. This cements the relationship between ChangesetList (parent container) and Changeset (child) and passes translations down so Changeset can use them to translate the text "Loading..." Test Plan: Viewed loading changes. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12616 Differential Revision: https://secure.phabricator.com/D17846
This commit is contained in:
parent
64a54aac9d
commit
fe44e987fb
5 changed files with 55 additions and 34 deletions
|
@ -13,7 +13,7 @@ return array(
|
|||
'core.pkg.js' => '2ff7879f',
|
||||
'darkconsole.pkg.js' => '1f9a31bc',
|
||||
'differential.pkg.css' => '90b30783',
|
||||
'differential.pkg.js' => '51d9bebe',
|
||||
'differential.pkg.js' => '2de0157a',
|
||||
'diffusion.pkg.css' => 'b93d9b8c',
|
||||
'diffusion.pkg.js' => '84c8f8fd',
|
||||
'favicon.ico' => '30672e08',
|
||||
|
@ -390,8 +390,8 @@ return array(
|
|||
'rsrc/js/application/dashboard/behavior-dashboard-move-panels.js' => '408bf173',
|
||||
'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '453c5375',
|
||||
'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => 'd4eecc63',
|
||||
'rsrc/js/application/diff/DiffChangeset.js' => 'ed7bc580',
|
||||
'rsrc/js/application/diff/DiffChangesetList.js' => 'f9ea2d8b',
|
||||
'rsrc/js/application/diff/DiffChangeset.js' => '2cbf5575',
|
||||
'rsrc/js/application/diff/DiffChangesetList.js' => '16c14b02',
|
||||
'rsrc/js/application/diff/behavior-preview-link.js' => '051c7832',
|
||||
'rsrc/js/application/differential/DifferentialInlineCommentEditor.js' => '2e3f9738',
|
||||
'rsrc/js/application/differential/behavior-comment-jump.js' => '4fdb476d',
|
||||
|
@ -399,7 +399,7 @@ return array(
|
|||
'rsrc/js/application/differential/behavior-diff-radios.js' => 'e1ff79b1',
|
||||
'rsrc/js/application/differential/behavior-edit-inline-comments.js' => 'c0f1c3b5',
|
||||
'rsrc/js/application/differential/behavior-keyboard-nav.js' => '92904457',
|
||||
'rsrc/js/application/differential/behavior-populate.js' => '7356b23d',
|
||||
'rsrc/js/application/differential/behavior-populate.js' => '8991de30',
|
||||
'rsrc/js/application/differential/behavior-toggle-files.js' => 'ca3f91eb',
|
||||
'rsrc/js/application/differential/behavior-user-select.js' => 'a8d8459d',
|
||||
'rsrc/js/application/diffusion/DiffusionLocateFileSource.js' => 'c93358e3',
|
||||
|
@ -626,7 +626,7 @@ return array(
|
|||
'javelin-behavior-differential-edit-inline-comments' => 'c0f1c3b5',
|
||||
'javelin-behavior-differential-feedback-preview' => 'b064af76',
|
||||
'javelin-behavior-differential-keyboard-navigation' => '92904457',
|
||||
'javelin-behavior-differential-populate' => '7356b23d',
|
||||
'javelin-behavior-differential-populate' => '8991de30',
|
||||
'javelin-behavior-differential-toggle-files' => 'ca3f91eb',
|
||||
'javelin-behavior-differential-user-select' => 'a8d8459d',
|
||||
'javelin-behavior-diffusion-browse-file' => '054a0f0b',
|
||||
|
@ -784,8 +784,8 @@ return array(
|
|||
'phabricator-darklog' => 'c8e1ffe3',
|
||||
'phabricator-darkmessage' => 'c48cccdd',
|
||||
'phabricator-dashboard-css' => 'fe5b1869',
|
||||
'phabricator-diff-changeset' => 'ed7bc580',
|
||||
'phabricator-diff-changeset-list' => 'f9ea2d8b',
|
||||
'phabricator-diff-changeset' => '2cbf5575',
|
||||
'phabricator-diff-changeset-list' => '16c14b02',
|
||||
'phabricator-drag-and-drop-file-upload' => '58dea2fa',
|
||||
'phabricator-draggable-list' => 'bea6e7f4',
|
||||
'phabricator-fatal-config-template-css' => '8f18fa41',
|
||||
|
@ -1004,6 +1004,9 @@ return array(
|
|||
'javelin-dom',
|
||||
'javelin-history',
|
||||
),
|
||||
'16c14b02' => array(
|
||||
'javelin-install',
|
||||
),
|
||||
'17bb8539' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-stratcom',
|
||||
|
@ -1113,6 +1116,16 @@ return array(
|
|||
'javelin-install',
|
||||
'javelin-event',
|
||||
),
|
||||
'2cbf5575' => array(
|
||||
'javelin-dom',
|
||||
'javelin-util',
|
||||
'javelin-stratcom',
|
||||
'javelin-install',
|
||||
'javelin-workflow',
|
||||
'javelin-router',
|
||||
'javelin-behavior-device',
|
||||
'javelin-vector',
|
||||
),
|
||||
'2e3f9738' => array(
|
||||
'javelin-dom',
|
||||
'javelin-util',
|
||||
|
@ -1458,14 +1471,6 @@ return array(
|
|||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
),
|
||||
'7356b23d' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
'javelin-stratcom',
|
||||
'phabricator-tooltip',
|
||||
'phabricator-diff-changeset-list',
|
||||
'phabricator-diff-changeset',
|
||||
),
|
||||
'73d09eef' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-vector',
|
||||
|
@ -1585,6 +1590,14 @@ return array(
|
|||
'phabricator-draggable-list',
|
||||
'javelin-workboard-column',
|
||||
),
|
||||
'8991de30' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
'javelin-stratcom',
|
||||
'phabricator-tooltip',
|
||||
'phabricator-diff-changeset-list',
|
||||
'phabricator-diff-changeset',
|
||||
),
|
||||
'8a41885b' => array(
|
||||
'javelin-install',
|
||||
'javelin-dom',
|
||||
|
@ -2155,16 +2168,6 @@ return array(
|
|||
'javelin-dom',
|
||||
'phabricator-draggable-list',
|
||||
),
|
||||
'ed7bc580' => array(
|
||||
'javelin-dom',
|
||||
'javelin-util',
|
||||
'javelin-stratcom',
|
||||
'javelin-install',
|
||||
'javelin-workflow',
|
||||
'javelin-router',
|
||||
'javelin-behavior-device',
|
||||
'javelin-vector',
|
||||
),
|
||||
'eded9ee8' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-typeahead-ondemand-source',
|
||||
|
@ -2222,9 +2225,6 @@ return array(
|
|||
'javelin-install',
|
||||
'javelin-dom',
|
||||
),
|
||||
'f9ea2d8b' => array(
|
||||
'javelin-install',
|
||||
),
|
||||
'fbe497e7' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-util',
|
||||
|
|
|
@ -236,6 +236,8 @@ final class DifferentialChangesetListView extends AphrontView {
|
|||
'View Unified' => pht('View Unified'),
|
||||
'Change Text Encoding...' => pht('Change Text Encoding...'),
|
||||
'Highlight As...' => pht('Highlight As...'),
|
||||
|
||||
'Loading...' => pht('Loading...'),
|
||||
),
|
||||
));
|
||||
|
||||
|
|
|
@ -26,6 +26,10 @@ JX.install('DiffChangeset', {
|
|||
this._loaded = data.loaded;
|
||||
},
|
||||
|
||||
properties: {
|
||||
changesetList: null
|
||||
},
|
||||
|
||||
members: {
|
||||
_node: null,
|
||||
_loaded: false,
|
||||
|
@ -121,6 +125,7 @@ JX.install('DiffChangeset', {
|
|||
this._sequence++;
|
||||
|
||||
var params = this._getViewParameters();
|
||||
var pht = this.getChangesetList().getTranslations();
|
||||
|
||||
var workflow = new JX.Workflow(this._renderURI, params)
|
||||
.setHandler(JX.bind(this, this._onresponse, this._sequence));
|
||||
|
@ -132,7 +137,7 @@ JX.install('DiffChangeset', {
|
|||
JX.$N(
|
||||
'div',
|
||||
{className: 'differential-loading'},
|
||||
'Loading...'));
|
||||
pht('Loading...')));
|
||||
|
||||
return this;
|
||||
},
|
||||
|
@ -152,9 +157,10 @@ JX.install('DiffChangeset', {
|
|||
var params = this._getViewParameters();
|
||||
params.range = range;
|
||||
|
||||
var pht = this.getChangesetList().getTranslations();
|
||||
|
||||
var container = JX.DOM.scry(target, 'td')[0];
|
||||
// TODO: pht()
|
||||
JX.DOM.setContent(container, 'Loading...');
|
||||
JX.DOM.setContent(container, pht('Loading...'));
|
||||
JX.DOM.alterClass(target, 'differential-show-more-loading', true);
|
||||
|
||||
var workflow = new JX.Workflow(this._renderURI, params)
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
JX.install('DiffChangesetList', {
|
||||
|
||||
construct: function() {
|
||||
this._changesets = [];
|
||||
|
||||
var onload = JX.bind(this, this._ifawake, this._onload);
|
||||
JX.Stratcom.listen('click', 'differential-load', onload);
|
||||
|
@ -24,6 +25,7 @@ JX.install('DiffChangesetList', {
|
|||
|
||||
members: {
|
||||
_asleep: true,
|
||||
_changesets: null,
|
||||
|
||||
sleep: function() {
|
||||
this._asleep = true;
|
||||
|
@ -37,6 +39,15 @@ JX.install('DiffChangesetList', {
|
|||
return this._asleep;
|
||||
},
|
||||
|
||||
newChangesetForNode: function(node) {
|
||||
var changeset = JX.DiffChangeset.getForNode(node);
|
||||
|
||||
this._changesets.push(changeset);
|
||||
changeset.setChangesetList(this);
|
||||
|
||||
return changeset;
|
||||
},
|
||||
|
||||
getChangesetForNode: function(node) {
|
||||
return JX.DiffChangeset.getForNode(node);
|
||||
},
|
||||
|
|
|
@ -70,9 +70,11 @@ JX.behavior('differential-populate', function(config, statics) {
|
|||
|
||||
for (var ii = 0; ii < config.changesetViewIDs.length; ii++) {
|
||||
var id = config.changesetViewIDs[ii];
|
||||
var view = JX.DiffChangeset.getForNode(JX.$(id));
|
||||
if (view.shouldAutoload()) {
|
||||
view.setStabilize(true).load();
|
||||
var node = JX.$(id);
|
||||
|
||||
var changeset = changeset_list.newChangesetForNode(node);
|
||||
if (changeset.shouldAutoload()) {
|
||||
changeset.setStabilize(true).load();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue