Skip to content

Commit

Permalink
fix i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 committed Dec 10, 2019
1 parent e2b9cea commit bb6276c
Show file tree
Hide file tree
Showing 10 changed files with 160 additions and 176 deletions.
1 change: 1 addition & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"data": ["src/legacy/core_plugins/data", "src/plugins/data"],
"embeddableApi": "src/plugins/embeddable",
"share": "src/plugins/share",
"home": "src/plugins/home",
"esUi": "src/plugins/es_ui_shared",
"devTools": "src/plugins/dev_tools",
"expressions": "src/plugins/expressions",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import { getSavedObjects } from './saved_objects';
import { fieldMappings } from './field_mappings';
import { SampleDatasetSchema, AppLinkSchema } from '../../lib/sample_dataset_registry_types';

const ecommerceName = i18n.translate('server.sampleData.ecommerceSpecTitle', {
const ecommerceName = i18n.translate('home.sampleData.ecommerceSpecTitle', {
defaultMessage: 'Sample eCommerce orders',
});
const ecommerceDescription = i18n.translate('server.sampleData.ecommerceSpecDescription', {
const ecommerceDescription = i18n.translate('home.sampleData.ecommerceSpecDescription', {
defaultMessage: 'Sample data, visualizations, and dashboards for tracking eCommerce orders.',
});
const initialAppLinks = [] as AppLinkSchema[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.ecommerceSpec.salesByCategoryTitle', {
title: i18n.translate('home.sampleData.ecommerceSpec.salesByCategoryTitle', {
defaultMessage: '[eCommerce] Sales by Category',
}),
visState:
Expand All @@ -53,7 +53,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.ecommerceSpec.salesByGenderTitle', {
title: i18n.translate('home.sampleData.ecommerceSpec.salesByGenderTitle', {
defaultMessage: '[eCommerce] Sales by Gender',
}),
visState:
Expand All @@ -75,7 +75,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.ecommerceSpec.markdownTitle', {
title: i18n.translate('home.sampleData.ecommerceSpec.markdownTitle', {
defaultMessage: '[eCommerce] Markdown',
}),
visState:
Expand All @@ -96,7 +96,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.ecommerceSpec.controlsTitle', {
title: i18n.translate('home.sampleData.ecommerceSpec.controlsTitle', {
defaultMessage: '[eCommerce] Controls',
}),
visState:
Expand All @@ -117,7 +117,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '2',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.ecommerceSpec.promotionTrackingTitle', {
title: i18n.translate('home.sampleData.ecommerceSpec.promotionTrackingTitle', {
defaultMessage: '[eCommerce] Promotion Tracking',
}),
visState:
Expand All @@ -138,7 +138,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.ecommerceSpec.totalRevenueTitle', {
title: i18n.translate('home.sampleData.ecommerceSpec.totalRevenueTitle', {
defaultMessage: '[eCommerce] Total Revenue',
}),
visState:
Expand All @@ -160,7 +160,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.ecommerceSpec.soldProductsPerDayTitle', {
title: i18n.translate('home.sampleData.ecommerceSpec.soldProductsPerDayTitle', {
defaultMessage: '[eCommerce] Sold Products per Day',
}),
visState:
Expand All @@ -181,7 +181,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.ecommerceSpec.averageSalesPriceTitle', {
title: i18n.translate('home.sampleData.ecommerceSpec.averageSalesPriceTitle', {
defaultMessage: '[eCommerce] Average Sales Price',
}),
visState:
Expand All @@ -204,7 +204,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.ecommerceSpec.averageSoldQuantityTitle', {
title: i18n.translate('home.sampleData.ecommerceSpec.averageSoldQuantityTitle', {
defaultMessage: '[eCommerce] Average Sold Quantity',
}),
visState:
Expand All @@ -227,7 +227,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.ecommerceSpec.ordersTitle', {
title: i18n.translate('home.sampleData.ecommerceSpec.ordersTitle', {
defaultMessage: '[eCommerce] Orders',
}),
description: '',
Expand All @@ -249,7 +249,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.ecommerceSpec.averageSalesPerRegionTitle', {
title: i18n.translate('home.sampleData.ecommerceSpec.averageSalesPerRegionTitle', {
defaultMessage: '[eCommerce] Average Sales Per Region',
}),
visState:
Expand All @@ -271,7 +271,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.ecommerceSpec.topSellingProductsTitle', {
title: i18n.translate('home.sampleData.ecommerceSpec.topSellingProductsTitle', {
defaultMessage: '[eCommerce] Top Selling Products',
}),
visState:
Expand Down Expand Up @@ -372,11 +372,11 @@ export const getSavedObjects = (): SavedObject[] => [
dashboard: '7.0.0',
},
attributes: {
title: i18n.translate('server.sampleData.ecommerceSpec.revenueDashboardTitle', {
title: i18n.translate('home.sampleData.ecommerceSpec.revenueDashboardTitle', {
defaultMessage: '[eCommerce] Revenue Dashboard',
}),
hits: 0,
description: i18n.translate('server.sampleData.ecommerceSpec.revenueDashboardDescription', {
description: i18n.translate('home.sampleData.ecommerceSpec.revenueDashboardDescription', {
defaultMessage: 'Analyze mock eCommerce orders and revenue',
}),
panelsJSON:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import { getSavedObjects } from './saved_objects';
import { fieldMappings } from './field_mappings';
import { SampleDatasetSchema, AppLinkSchema } from '../../lib/sample_dataset_registry_types';

const flightsName = i18n.translate('server.sampleData.flightsSpecTitle', {
const flightsName = i18n.translate('home.sampleData.flightsSpecTitle', {
defaultMessage: 'Sample flight data',
});
const flightsDescription = i18n.translate('server.sampleData.flightsSpecDescription', {
const flightsDescription = i18n.translate('home.sampleData.flightsSpecDescription', {
defaultMessage: 'Sample data, visualizations, and dashboards for monitoring flight routes.',
});
const initialAppLinks = [] as AppLinkSchema[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.flightsSpec.controlsTitle', {
title: i18n.translate('home.sampleData.flightsSpec.controlsTitle', {
defaultMessage: '[Flights] Controls',
}),
visState:
Expand All @@ -52,7 +52,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.flightsSpec.flightCountAndAverageTicketPriceTitle', {
title: i18n.translate('home.sampleData.flightsSpec.flightCountAndAverageTicketPriceTitle', {
defaultMessage: '[Flights] Flight Count and Average Ticket Price',
}),
visState:
Expand All @@ -75,7 +75,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.flightsSpec.flightLogTitle', {
title: i18n.translate('home.sampleData.flightsSpec.flightLogTitle', {
defaultMessage: '[Flights] Flight Log',
}),
description: '',
Expand Down Expand Up @@ -107,7 +107,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.flightsSpec.airlineCarrierTitle', {
title: i18n.translate('home.sampleData.flightsSpec.airlineCarrierTitle', {
defaultMessage: '[Flights] Airline Carrier',
}),
visState:
Expand All @@ -129,7 +129,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.flightsSpec.delayTypeTitle', {
title: i18n.translate('home.sampleData.flightsSpec.delayTypeTitle', {
defaultMessage: '[Flights] Delay Type',
}),
visState:
Expand All @@ -151,7 +151,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.flightsSpec.delaysAndCancellationsTitle', {
title: i18n.translate('home.sampleData.flightsSpec.delaysAndCancellationsTitle', {
defaultMessage: '[Flights] Delays & Cancellations',
}),
visState:
Expand All @@ -172,7 +172,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.flightsSpec.delayBucketsTitle', {
title: i18n.translate('home.sampleData.flightsSpec.delayBucketsTitle', {
defaultMessage: '[Flights] Delay Buckets',
}),
visState:
Expand All @@ -194,7 +194,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.flightsSpec.flightDelaysTitle', {
title: i18n.translate('home.sampleData.flightsSpec.flightDelaysTitle', {
defaultMessage: '[Flights] Flight Delays',
}),
visState:
Expand All @@ -216,7 +216,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.flightsSpec.flightCancellationsTitle', {
title: i18n.translate('home.sampleData.flightsSpec.flightCancellationsTitle', {
defaultMessage: '[Flights] Flight Cancellations',
}),
visState:
Expand All @@ -238,7 +238,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.flightsSpec.destinationWeatherTitle', {
title: i18n.translate('home.sampleData.flightsSpec.destinationWeatherTitle', {
defaultMessage: '[Flights] Destination Weather',
}),
visState:
Expand All @@ -260,7 +260,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.flightsSpec.markdownInstructionsTitle', {
title: i18n.translate('home.sampleData.flightsSpec.markdownInstructionsTitle', {
defaultMessage: '[Flights] Markdown Instructions',
}),
visState:
Expand All @@ -281,7 +281,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.flightsSpec.originCountryTicketPricesTitle', {
title: i18n.translate('home.sampleData.flightsSpec.originCountryTicketPricesTitle', {
defaultMessage: '[Flights] Origin Country Ticket Prices',
}),
visState:
Expand All @@ -303,7 +303,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.flightsSpec.totalFlightDelaysTitle', {
title: i18n.translate('home.sampleData.flightsSpec.totalFlightDelaysTitle', {
defaultMessage: '[Flights] Total Flight Delays',
}),
visState:
Expand All @@ -326,7 +326,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.flightsSpec.totalFlightCancellationsTitle', {
title: i18n.translate('home.sampleData.flightsSpec.totalFlightCancellationsTitle', {
defaultMessage: '[Flights] Total Flight Cancellations',
}),
visState:
Expand All @@ -349,7 +349,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.flightsSpec.originCountryTitle', {
title: i18n.translate('home.sampleData.flightsSpec.originCountryTitle', {
defaultMessage: '[Flights] Origin Country vs. Destination Country',
}),
visState:
Expand All @@ -372,7 +372,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.flightsSpec.totalFlightsTitle', {
title: i18n.translate('home.sampleData.flightsSpec.totalFlightsTitle', {
defaultMessage: '[Flights] Total Flights',
}),
visState:
Expand All @@ -394,7 +394,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '1',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.flightsSpec.averageTicketPriceTitle', {
title: i18n.translate('home.sampleData.flightsSpec.averageTicketPriceTitle', {
defaultMessage: '[Flights] Average Ticket Price',
}),
visState:
Expand All @@ -416,7 +416,7 @@ export const getSavedObjects = (): SavedObject[] => [
version: '3',
migrationVersion: {},
attributes: {
title: i18n.translate('server.sampleData.flightsSpec.airportConnectionsTitle', {
title: i18n.translate('home.sampleData.flightsSpec.airportConnectionsTitle', {
defaultMessage: '[Flights] Airport Connections (Hover Over Airport)',
}),
visState:
Expand Down Expand Up @@ -547,12 +547,12 @@ export const getSavedObjects = (): SavedObject[] => [
dashboard: '7.0.0',
},
attributes: {
title: i18n.translate('server.sampleData.flightsSpec.globalFlightDashboardTitle', {
title: i18n.translate('home.sampleData.flightsSpec.globalFlightDashboardTitle', {
defaultMessage: '[Flights] Global Flight Dashboard',
}),
hits: 0,
description: i18n.translate(
'server.sampleData.flightsSpec.globalFlightDashboardDescription',
'home.sampleData.flightsSpec.globalFlightDashboardDescription',
{
defaultMessage:
'Analyze mock flight data for ES-Air, Logstash Airways, Kibana Airlines and JetBeats',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import { getSavedObjects } from './saved_objects';
import { fieldMappings } from './field_mappings';
import { SampleDatasetSchema, AppLinkSchema } from '../../lib/sample_dataset_registry_types';

const logsName = i18n.translate('server.sampleData.logsSpecTitle', {
const logsName = i18n.translate('home.sampleData.logsSpecTitle', {
defaultMessage: 'Sample web logs',
});
const logsDescription = i18n.translate('server.sampleData.logsSpecDescription', {
const logsDescription = i18n.translate('home.sampleData.logsSpecDescription', {
defaultMessage: 'Sample data, visualizations, and dashboards for monitoring web logs.',
});
const initialAppLinks = [] as AppLinkSchema[];
Expand Down
Loading

0 comments on commit bb6276c

Please sign in to comment.