Skip to content

Commit

Permalink
PR comments + fix i18n check
Browse files Browse the repository at this point in the history
  • Loading branch information
joshdover committed Dec 7, 2021
1 parent 470c187 commit b742dc0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 42 deletions.
11 changes: 8 additions & 3 deletions src/plugins/home/server/services/tutorials/tutorials_registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
TutorialProvider,
TutorialContextFactory,
ScopedTutorialContextFactory,
TutorialContext,
} from './lib/tutorials_registry_types';
import { TutorialSchema, tutorialSchema } from './lib/tutorial_schema';
import { builtInTutorials } from '../../tutorials/register';
Expand Down Expand Up @@ -78,7 +79,7 @@ export class TutorialsRegistry {
router.get(
{ path: '/api/kibana/home/tutorials', validate: false },
async (context, req, res) => {
const initialContext = { kibanaBranch: this.initContext.env.packageInfo.branch };
const initialContext = this.baseTutorialContext;
const scopedContext = this.scopedTutorialContextFactories.reduce(
(accumulatedContext, contextFactory) => {
return { ...accumulatedContext, ...contextFactory(req) };
Expand All @@ -94,7 +95,7 @@ export class TutorialsRegistry {
);
return {
registerTutorial: (specProvider: TutorialProvider) => {
const emptyContext = { kibanaBranch: this.initContext.env.packageInfo.branch };
const emptyContext = this.baseTutorialContext;
let tutorial: TutorialSchema;
try {
tutorial = tutorialSchema.validate(specProvider(emptyContext));
Expand Down Expand Up @@ -134,12 +135,16 @@ export class TutorialsRegistry {

if (customIntegrations) {
builtInTutorials.forEach((provider) => {
const tutorial = provider({ kibanaBranch: this.initContext.env.packageInfo.branch });
const tutorial = provider(this.baseTutorialContext);
registerBeatsTutorialsWithCustomIntegrations(core, customIntegrations, tutorial);
});
}
return {};
}

private get baseTutorialContext(): TutorialContext {
return { kibanaBranch: this.initContext.env.packageInfo.branch };
}
}

/** @public */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ export const createFilebeatInstructions = (context: TutorialContext) => {
getSpaceIdForBeatsTutorial(context),
],
textPost: i18n.translate(
'home.tutorials.common.filebeatInstructions.config.windowsTextPost',
'home.tutorials.common.filebeatInstructions.config.windowsTextPostMarkdown',
{
defaultMessage:
'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of \
Expand Down
19 changes: 0 additions & 19 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -2401,16 +2401,12 @@
"home.tutorials.common.auditbeatCloudInstructions.config.rpmTitle": "構成を編集する",
"home.tutorials.common.auditbeatCloudInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:",
"home.tutorials.common.auditbeatCloudInstructions.config.windowsTitle": "構成を編集する",
"home.tutorials.common.auditbeatInstructions.config.debTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。",
"home.tutorials.common.auditbeatInstructions.config.debTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:",
"home.tutorials.common.auditbeatInstructions.config.debTitle": "構成を編集する",
"home.tutorials.common.auditbeatInstructions.config.osxTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。",
"home.tutorials.common.auditbeatInstructions.config.osxTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:",
"home.tutorials.common.auditbeatInstructions.config.osxTitle": "構成を編集する",
"home.tutorials.common.auditbeatInstructions.config.rpmTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。",
"home.tutorials.common.auditbeatInstructions.config.rpmTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:",
"home.tutorials.common.auditbeatInstructions.config.rpmTitle": "構成を編集する",
"home.tutorials.common.auditbeatInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。",
"home.tutorials.common.auditbeatInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:",
"home.tutorials.common.auditbeatInstructions.config.windowsTitle": "構成を編集する",
"home.tutorials.common.auditbeatInstructions.install.debTextPost": "32 ビットパッケージをお探しですか?[ダウンロードページ]({linkUrl})をご覧ください。",
Expand Down Expand Up @@ -2459,16 +2455,12 @@
"home.tutorials.common.filebeatEnableInstructions.windowsTextPost": "「modules.d/{moduleName}.yml」」ファイルで設定を変更します。",
"home.tutorials.common.filebeatEnableInstructions.windowsTextPre": "「{path}」フォルダから次のファイルを実行します:",
"home.tutorials.common.filebeatEnableInstructions.windowsTitle": "{moduleName} モジュールを有効にし構成します",
"home.tutorials.common.filebeatInstructions.config.debTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。",
"home.tutorials.common.filebeatInstructions.config.debTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:",
"home.tutorials.common.filebeatInstructions.config.debTitle": "構成を編集する",
"home.tutorials.common.filebeatInstructions.config.osxTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。",
"home.tutorials.common.filebeatInstructions.config.osxTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:",
"home.tutorials.common.filebeatInstructions.config.osxTitle": "構成を編集する",
"home.tutorials.common.filebeatInstructions.config.rpmTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。",
"home.tutorials.common.filebeatInstructions.config.rpmTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:",
"home.tutorials.common.filebeatInstructions.config.rpmTitle": "構成を編集する",
"home.tutorials.common.filebeatInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。",
"home.tutorials.common.filebeatInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:",
"home.tutorials.common.filebeatInstructions.config.windowsTitle": "構成を編集する",
"home.tutorials.common.filebeatInstructions.install.debTextPost": "32 ビットパッケージをお探しですか?[ダウンロードページ]({linkUrl})をご覧ください。",
Expand Down Expand Up @@ -2509,10 +2501,8 @@
"home.tutorials.common.functionbeatEnableOnPremInstructions.defaultTitle": "Cloudwatch ロググループの構成",
"home.tutorials.common.functionbeatEnableOnPremInstructionsOSXLinux.textPre": "「functionbeat.yml」ファイルで設定を変更します。",
"home.tutorials.common.functionbeatEnableOnPremInstructionsWindows.textPre": "{path} ファイルで設定を変更します。",
"home.tutorials.common.functionbeatInstructions.config.osxTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。",
"home.tutorials.common.functionbeatInstructions.config.osxTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:",
"home.tutorials.common.functionbeatInstructions.config.osxTitle": "Elastic クラスターの構成",
"home.tutorials.common.functionbeatInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。",
"home.tutorials.common.functionbeatInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:",
"home.tutorials.common.functionbeatInstructions.config.windowsTitle": "構成を編集する",
"home.tutorials.common.functionbeatInstructions.deploy.osxTextPre": "これにより Functionbeat が Lambda 関数としてインストールされます「setup」コマンドで Elasticsearch の構成を確認し、Kibana インデックスパターンを読み込みます。通常このコマンドを省いても大丈夫です。",
Expand Down Expand Up @@ -2553,16 +2543,12 @@
"home.tutorials.common.heartbeatEnableOnPremInstructions.osxTextPre": "「heartbeat.yml」ファイルの「heartbeat.monitors」設定を変更します。",
"home.tutorials.common.heartbeatEnableOnPremInstructions.rpmTextPre": "「heartbeat.yml」ファイルの「heartbeat.monitors」設定を変更します。",
"home.tutorials.common.heartbeatEnableOnPremInstructions.windowsTextPre": "「heartbeat.yml」ファイルの「heartbeat.monitors」設定を変更します。",
"home.tutorials.common.heartbeatInstructions.config.debTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。",
"home.tutorials.common.heartbeatInstructions.config.debTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:",
"home.tutorials.common.heartbeatInstructions.config.debTitle": "構成を編集する",
"home.tutorials.common.heartbeatInstructions.config.osxTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。",
"home.tutorials.common.heartbeatInstructions.config.osxTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:",
"home.tutorials.common.heartbeatInstructions.config.osxTitle": "構成を編集する",
"home.tutorials.common.heartbeatInstructions.config.rpmTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。",
"home.tutorials.common.heartbeatInstructions.config.rpmTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:",
"home.tutorials.common.heartbeatInstructions.config.rpmTitle": "構成を編集する",
"home.tutorials.common.heartbeatInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。",
"home.tutorials.common.heartbeatInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:",
"home.tutorials.common.heartbeatInstructions.config.windowsTitle": "構成を編集する",
"home.tutorials.common.heartbeatInstructions.install.debTextPost": "32 ビットパッケージをお探しですか?[ダウンロードページ]({link})をご覧ください。",
Expand Down Expand Up @@ -2616,16 +2602,12 @@
"home.tutorials.common.metricbeatEnableInstructions.windowsTextPost": "「modules.d/{moduleName}.yml」」ファイルで設定を変更します。",
"home.tutorials.common.metricbeatEnableInstructions.windowsTextPre": "「{path}」フォルダから次のファイルを実行します:",
"home.tutorials.common.metricbeatEnableInstructions.windowsTitle": "{moduleName} モジュールを有効にし構成します",
"home.tutorials.common.metricbeatInstructions.config.debTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。",
"home.tutorials.common.metricbeatInstructions.config.debTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:",
"home.tutorials.common.metricbeatInstructions.config.debTitle": "構成を編集する",
"home.tutorials.common.metricbeatInstructions.config.osxTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。",
"home.tutorials.common.metricbeatInstructions.config.osxTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:",
"home.tutorials.common.metricbeatInstructions.config.osxTitle": "構成を編集する",
"home.tutorials.common.metricbeatInstructions.config.rpmTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。",
"home.tutorials.common.metricbeatInstructions.config.rpmTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:",
"home.tutorials.common.metricbeatInstructions.config.rpmTitle": "構成を編集する",
"home.tutorials.common.metricbeatInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。",
"home.tutorials.common.metricbeatInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:",
"home.tutorials.common.metricbeatInstructions.config.windowsTitle": "構成を編集する",
"home.tutorials.common.metricbeatInstructions.install.debTextPost": "32 ビットパッケージをお探しですか?[ダウンロードページ]({link})をご覧ください。",
Expand Down Expand Up @@ -2660,7 +2642,6 @@
"home.tutorials.common.winlogbeat.premInstructions.gettingStarted.title": "はじめに",
"home.tutorials.common.winlogbeatCloudInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:",
"home.tutorials.common.winlogbeatCloudInstructions.config.windowsTitle": "構成を編集する",
"home.tutorials.common.winlogbeatInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。",
"home.tutorials.common.winlogbeatInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:",
"home.tutorials.common.winlogbeatInstructions.config.windowsTitle": "構成を編集する",
"home.tutorials.common.winlogbeatInstructions.install.windowsTextPost": "{path} ファイルの「output.elasticsearch」を Elasticsearch のインストールに設定します。",
Expand Down
Loading

0 comments on commit b742dc0

Please sign in to comment.