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

Discover translations #24079

Merged
merged 24 commits into from
Nov 20, 2018
Merged

Conversation

tibmt
Copy link
Contributor

@tibmt tibmt commented Oct 16, 2018

Translation of Discover visualization component

@elasticmachine
Copy link
Contributor

💔 Build Failed

@maryia-lapata maryia-lapata changed the title Feature/discover translations Discover translations Oct 16, 2018
@pavel06081991 pavel06081991 requested review from maryia-lapata and removed request for pavel06081991 October 17, 2018 09:42
Copy link
Contributor

@maryia-lapata maryia-lapata left a comment

Choose a reason for hiding this comment

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

Pease fix the comment.

https://github.com/elastic/kibana/pull/24079/files#diff-3acdfbed044ff30a7ee38e913d157566R21
Here hit and hits should be translated as well.

under the “Scripted fields” tab.
<FormattedMessage
id="kbn.discover.fetchError.howToAddressErrorDescription"
defaultMessage="You can address this error by editing the &lsquo;{fetchErrorScript}&rsquo; field
Copy link
Contributor

Choose a reason for hiding this comment

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

Please move &lsquo; and &rsquo; to fetchErrorScript value and align default message:

          defaultMessage="You can address this error by editing the {fetchErrorScript} field in {managementLink},
          under the &ldquo;Scripted fields&rdquo; tab."

@@ -30,9 +37,14 @@
css-truncate
css-truncate-expandable="true"
class="dscFieldDetails__value"
aria-label="Value: {{:: bucket.display === '' ? 'Empty string' : bucket.display }}"
aria-label="{{bucketAriaLabel}}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use bind once here.

</label>
<label
for="discoverFieldChooserFilterAggregatable"
i18n-id="kbn.discover.fieldChooser.aggregatableLabel"
Copy link
Contributor

Choose a reason for hiding this comment

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

kbn.discover.fieldChooser.aggregatableLabel => kbn.discover.fieldChooser.filter.aggregatableLabel

</label>
<label
for="discoverFieldChooserFilterSearchable"
i18n-id="kbn.discover.fieldChooser.searchableLabel"
Copy link
Contributor

Choose a reason for hiding this comment

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

kbn.discover.fieldChooser. => kbn.discover.fieldChooser.filter.

</label>
<label
for="discoverFieldChooserFilterType"
i18n-id="kbn.discover.fieldChooser.typeLabel"
Copy link
Contributor

Choose a reason for hiding this comment

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

kbn.discover.fieldChooser. => kbn.discover.fieldChooser.filter.

@@ -80,11 +98,17 @@ export class DiscoverNoResults extends Component {

<EuiText>
<h3>
Address shard failures
<FormattedMessage
id="kbn.discover.noResults.addressShardFailures"
Copy link
Contributor

Choose a reason for hiding this comment

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

.addressShardFailures -> .addressShardFailuresTitle

defaultMessage="One or more of the indices you&rsquo;re looking at contains a date field. Your query may
not match anything in the current time range, or there may not be any data at all in
the currently selected time range. You can try {timepickerLink} and changing the time range to one which contains data.
"
Copy link
Contributor

Choose a reason for hiding this comment

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

Please move double quote to the previous line.

@@ -25,11 +25,15 @@ import './controllers/discover';
import 'ui/doc_table/components/table_row';
import { FeatureCatalogueRegistryProvider, FeatureCatalogueCategory } from 'ui/registry/feature_catalogue';

FeatureCatalogueRegistryProvider.register(() => {
FeatureCatalogueRegistryProvider.register((i18n) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

(i18n) => i18n

@@ -641,9 +691,16 @@ function discoverController(

if (status.remaining > 0) {
const inspectorRequest = inspectorAdapters.requests.start(
`Segment ${$scope.fetchStatus.complete}`,
i18n('kbn.discover.segmentFetchCompleteStatusTitle', {
Copy link
Contributor

Choose a reason for hiding this comment

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

=> kbn.discover.inspectorRequest.segmentFetchCompleteStatusTitle

{
description: `This request queries Elasticsearch to fetch the data for the search.`,
description: i18n('kbn.discover.segmentFetchCompleteStatusDescription', {
Copy link
Contributor

Choose a reason for hiding this comment

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

=> kbn.discover.inspectorRequest.segmentFetchCompleteStatusDescription

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@timroes timroes added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Oct 27, 2018
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@pavel06081991 pavel06081991 left a comment

Choose a reason for hiding this comment

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

LGTM

@pavel06081991 pavel06081991 requested a review from Bargs November 6, 2018 15:06
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@Bargs Bargs left a comment

Choose a reason for hiding this comment

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

I can't judge the translation code itself since I'm not familiar with the best practices there but I pulled down the PR and poked at Discover for awhile and everything still seems to be working correctly. LGTM.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@maryia-lapata maryia-lapata left a comment

Choose a reason for hiding this comment

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

LGTM

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@maryia-lapata maryia-lapata merged commit 973640c into elastic:master Nov 20, 2018
pavel06081991 pushed a commit to pavel06081991/kibana that referenced this pull request Nov 20, 2018
* translate discover plugin

* update discover translation PR

* Update fetch_error.js

* Update unit tests

* Fix eslint

* use separate span tag for label

* use separate tags for translated labels

* resolve review comments

* Update snapshot

* fix issue with bucket aria-label

* fix quotes

* Update snapshot

* fix quotes

* update snapshots
pavel06081991 added a commit that referenced this pull request Nov 21, 2018
translate discover plugin
defaultMessage="You can address this error by editing the {fetchErrorScript} field
in {managementLink}, under the {scriptedFields} tab."
values={{
fetchErrorScript: '&lsquo;' + fetchError.script + '&rsquo;',
Copy link
Member

Choose a reason for hiding this comment

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

@tibmt @Bargs I don't think the quotes need escaping here. This is how it looks now:

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