From e4cfe8aeecf3a94c9c7b6cbf8de754ad5f19ef9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Wed, 3 Apr 2024 10:49:45 +0200 Subject: [PATCH] Live Template: use i18n attributes, update docs --- .../src/main/resources/META-INF/plugin.xml | 2 ++ .../src/main/resources/liveTemplates/Markdown.xml | 10 +++++----- .../main/resources/messages/LiveTemplates.properties | 2 ++ topics/tutorials/live_templates/template_support.md | 8 +++++--- 4 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 code_samples/live_templates/src/main/resources/messages/LiveTemplates.properties diff --git a/code_samples/live_templates/src/main/resources/META-INF/plugin.xml b/code_samples/live_templates/src/main/resources/META-INF/plugin.xml index 33828fc62..7eb46a929 100644 --- a/code_samples/live_templates/src/main/resources/META-INF/plugin.xml +++ b/code_samples/live_templates/src/main/resources/META-INF/plugin.xml @@ -32,6 +32,8 @@ IntelliJ Platform SDK + messages.LiveTemplates + - \ No newline at end of file + diff --git a/code_samples/live_templates/src/main/resources/messages/LiveTemplates.properties b/code_samples/live_templates/src/main/resources/messages/LiveTemplates.properties new file mode 100644 index 000000000..c95e23be9 --- /dev/null +++ b/code_samples/live_templates/src/main/resources/messages/LiveTemplates.properties @@ -0,0 +1,2 @@ +live.template.mc.description=SDK: Convert to title case +live.template.{.description=SDK: New link reference diff --git a/topics/tutorials/live_templates/template_support.md b/topics/tutorials/live_templates/template_support.md index a6173b892..c086d56cc 100644 --- a/topics/tutorials/live_templates/template_support.md +++ b/topics/tutorials/live_templates/template_support.md @@ -1,6 +1,6 @@ -# Providing Live Templates + - +# Providing Live Templates Adding custom Live Templates. @@ -57,7 +57,9 @@ The export produces a file called Markdown.xml with the following c ``` -The display `name` can also provide localized variants by specifying `key` and `resource-bundle` attributes additionally (2020.3 and later). +The display `description` can also provide localized variants by specifying +`key` and `resource-bundle` attributes instead (code insight is available in 2020.3 and later). +A quick fix to extract the localized key is available since 2024.2. Copy this file into the [plugin's resources folder](%gh-sdk-samples%/live_templates/src/main/resources/liveTemplates).