Skip to content
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

Translations for Reporting plugin #22757

Merged

Conversation

maryia-lapata
Copy link
Contributor

Apply translations for Reporting plugin

Fixes #22647

Generate {{ exportConfig.exportType.name }}
<span i18n-id="xpack.reporting.exportConfig.generateButtonLabel"
i18n-default-message="Generate {name}"
i18n-values="{ name: exportConfig.exportType.name }"></span>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting and indentation looks messed up here. Should be like:

        <span
          i18n-id="xpack.reporting.exportConfig.generateButtonLabel"
          i18n-default-message="Generate {name}"
          i18n-values="{ name: exportConfig.exportType.name }"
        >
        </span>

<h2 class="kuiLocalDropdownTitle">
Reporting
</h2>
<h2 class="kuiLocalDropdownTitle" i18n-id="xpack.reporting.exportConfig.reportingTitle" i18n-default-message="Reporting"></h2>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's break this line up per attribute, for consistency

Please save your work before generating a report.
<div ng-show="exportConfig.isDirty()" data-test-subj="unsavedChangesReportingWarning"
i18n-id="xpack.reporting.exportConfig.saveWorkDescription"
i18n-default-message="Please save your work before generating a report.">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<div
  ng-show="exportConfig.isDirty()"
  data-test-subj="unsavedChangesReportingWarning"
  i18n-id="xpack.reporting.exportConfig.saveWorkDescription"
  i18n-default-message="Please save your work before generating a report."
>
</div>

@@ -56,15 +56,16 @@ module.directive('exportConfig', ($rootScope, reportingDocumentControl, reportin
$scope.updateUrl = (options) => {
return $scope.getRelativePath(options)
.then(relativePath => {
$scope.exportConfig.absoluteUrl = createAbsoluteUrl(relativePath);
$scope.exportConfig.absoluteUrl = createAbsoluteUrl(relativePath)
|| i18n('xpack.reporting.exportConfig.generationUrl.loadingPlaceholder', { defaultMessage: 'Loading...' });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This moved code looks like it needs some manual testing. I'm not super familiar with this file. Do you have testing steps for this?

Copy link
Member

@tsullivan tsullivan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feedback is mostly requeststo keep formatting and indentation per our coding style

@maryia-lapata
Copy link
Contributor Author

Blocked by #22441

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@tsullivan
Copy link
Member

Hi, can you look into the merge conflict?

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@tsullivan
Copy link
Member

Hi, looks like there's one small merge conflict on this.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@maryia-lapata
Copy link
Contributor Author

Here was a broken functional test x-pack/test/reporting/functional/reporting·js.reporting app Reporting Discover Generate CSV button generates a report with data with error message:

│ debg findByCssSelector [data-test-subj~="completeReportSuccess"] [data-test-subj~="toastCloseButton"]
│ debg --- retry.try error: [POST http://localhost:9515/session/1c204ee58a2ebea8b87417a4ec84be1b/element 
    / {"using":"css selector","value":"[data-test-subj~=\"completeReportSuccess\"] 
    [data-test-subj~=\"toastCloseButton\"]"}] no such element: Unable to locate element: 
    {"method":"css selector","selector":"[data-test-subj~="completeReportSuccess"] [data-test-subj~="toastCloseButton"]"}

This was caused by const in declaring of enum JobStatuses: export const enum JobStatuses, tslint didn't failed that's why it was difficult to find the reason.

@tsullivan tsullivan merged commit ed9512d into elastic:master Dec 3, 2018
tsullivan pushed a commit to tsullivan/kibana that referenced this pull request Dec 3, 2018
* Translate Reporting

* Use i18n core

* Translate Reporting

* Translate Reporting

* Refactoring

* Add reporting to i18n config

* Fix tooltip translation

* Apply formatting for html

* Translate label in TS files.

* Reduce tag number

* Rename ids

* Update snapshot

* Revert changes for removing span

* Add types

* Translate statuses

* update translation of Reporting plugin

* fix variable name

* fix constants names

* update reporting translation

* fix copyright

* Fix types/angular packages incompatibility

* Update yarn.lock

* Fix duplicated import

* Fix CI

* Small adjustments
@tsullivan
Copy link
Member

6.x/6.6.0: #26569

tsullivan added a commit that referenced this pull request Dec 4, 2018
* Translate Reporting

* Use i18n core

* Translate Reporting

* Translate Reporting

* Refactoring

* Add reporting to i18n config

* Fix tooltip translation

* Apply formatting for html

* Translate label in TS files.

* Reduce tag number

* Rename ids

* Update snapshot

* Revert changes for removing span

* Add types

* Translate statuses

* update translation of Reporting plugin

* fix variable name

* fix constants names

* update reporting translation

* fix copyright

* Fix types/angular packages incompatibility

* Update yarn.lock

* Fix duplicated import

* Fix CI

* Small adjustments
@maryia-lapata maryia-lapata deleted the feature/translations/reporting branch December 4, 2018 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported Project:i18n Team:Visualizations Visualization editors, elastic-charts and infrastructure v6.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants