[IFT] Extracted interface-dependent strings to LearnBundle
authorAlexey Merkulov <alexey.merkulov@jetbrains.com>
Mon, 14 Sep 2020 08:49:52 +0000 (11:49 +0300)
committerintellij-monorepo-bot <intellij-monorepo-bot-no-reply@jetbrains.com>
Mon, 14 Sep 2020 08:51:02 +0000 (08:51 +0000)
GitOrigin-RevId: d9f6d54f8cb4d512a3e6f1466720aa881250cd62

ide-features-trainer/res/messages/LearnBundle.properties
ide-features-trainer/res/messages/LessonsBundle.properties
ide-features-trainer/src/training/learn/lesson/general/GotoActionLesson.kt
ide-features-trainer/src/training/learn/lesson/general/SurroundAndUnwrapLesson.kt
ide-features-trainer/src/training/learn/lesson/general/navigation/DeclarationAndUsagesLesson.kt
ide-features-trainer/src/training/learn/lesson/python/refactorings/PythonRefactorMenuLesson.kt
ide-features-trainer/src/training/learn/lesson/python/refactorings/PythonRenameLesson.kt

index d5b91968a382f3f56e21c0e0df26879402cd2b74..e4f423a36f45ae27415922393752acf620d475c6 100755 (executable)
@@ -100,3 +100,11 @@ experimental.tabbed.ui.switch.to.interactive.mode=Switch to Interactive Mode
 experimental.tabbed.ui.continue.lesson=Continue lesson
 experimental.tabbed.ui.show.steps=Show steps
 
+### These lines should much user interface
+# This prefix should be enough so Find Action (Ctrl+Shift+A) will show Show Line Numbers at the first item
+show.line.number.prefix.to.show.first=show line
+surround.and.unwrap.item=Unwrap {0}
+usages.tab.name=Usages of
+refactoring.menu.introduce.parameter.filter=pa
+#TODO: This prefix can be got from some general bundle when "Dynamic" will be extracted from `BaseRefactoringProcessor.createPresentation`
+refactoring.dynamic.references.prefix=Dynamic references
index 7b69a0b0e5be3f69f1f02e65dc2012fd88368624..f1b0beea18884dcc9da3857f046baaf0f5e1aaf6 100644 (file)
@@ -10,11 +10,9 @@ goto.action.lesson.name=Search for actions
 goto.action.mac.workaround=\nIf <strong>Terminal</strong> search opens instead of {0}, refer to <a href="{1}">this article</a>.
 goto.action.use.find.action=One of the most useful shortcuts is {0}. It lets you search through all available \
   actions without having to know their individual shortcuts. Try it now with {1}.
-goto.action.about.word=about
 goto.action.invoke.about.action=Let''s say you want to learn about {0}, type {1} and press {2}.
 goto.action.to.return.to.the.editor=Press {0} to return to the editor.
 goto.action.invoke.again= You can also use {0} to change the settings, invoke it again now.
-goto.action.show.line.input.required=show line
 goto.action.show.line.numbers.request=Type {0} to see {1} selector.
 goto.action.first.lines.toggle=Switch the line numbers {0, choice, 0#off|1#on}.
 goto.action.second.lines.toggle=Now switch the line numbers back {0, choice, 0#on|1#off}.
@@ -61,7 +59,6 @@ surround.and.unwrap.lesson.name=Surround and unwrap
 surround.and.unwrap.invoke.surround=Press {0} to surround the selected code fragment with some template code.
 surround.and.unwrap.choose.surround.item=Choose {0} item.
 surround.and.unwrap.invoke.unwrap=Let''s return to the initial file with the unwrapping action by {0}.
-surround.and.unwrap.item=Unwrap {0}
 surround.and.unwrap.choose.unwrap.item=Choose {0} item.
 
 ## Completion module
@@ -95,7 +92,6 @@ declaration.and.usages.show.usages=Now the caret is at the {0, choice, 0#method|
 declaration.and.usages.find.usages=Press {0} to see a more detailed view of usages. You can invoke {0} on either a declaration or usage.
 declaration.and.usages.pin.motivation=From the {0} view you can navigate to both usages and declarations. \
   The next search will override these results in the {0} view. To prevent it, pin the results:
-declaration.and.usages.tab.name=Usages of
 declaration.and.usages.right.click.tab=Right click the tab title, {0}.
 declaration.and.usages.select.pin.item=Select {0}.
 declaration.and.usages.hide.view=When you have finished browsing usages, press {0} to hide the view.
@@ -201,7 +197,7 @@ java.statement.completion.complete.finish.body=Type on one line: {0} and then pr
 
 java.debug.workflow.rebuild=For big programs rerun can take much time. When you find some mistake in pure method you can just rebuild \
   the project and apply <strong>Hot Swap</strong> JVM feature. Let''s build project: {0} or {1}.
-java.debug.workflow.confirm.hot.swap=Confirm <strong>Hot Swap</strong> replacement
+java.debug.workflow.confirm.hot.swap=Confirm <strong>Hot Swap</strong> replacement.
 java.debug.workflow.drop.frame=We patched our method, but right now we are still executing old obsolete {0} and it will throw the \
   exception again. Let''s drop the frame and return to the state before {1} call. Click {2} at the debug panel or press {3}.
 
@@ -275,7 +271,6 @@ python.quick.fix.refactoring.finish.refactoring=Press {0} (or click {1}) to fini
 
 python.refactoring.menu.show.refactoring.list={0} supports a variety of refactorings. Many of them have own shortcuts. \
   But for rare refactorings you can press {1} and preview a partial list of them.
-python.refactoring.menu.required.prefix=pa
 python.refactoring.menu.introduce.parameter=Suppose we want to replace this expression with a parameter. So we need to choose {0}. \
   Now simply type {1} (as a prefix of needed refactoring name) to reduce the proposed list.
 python.refactoring.menu.start.refactoring=Press {0} to start the Introduce Parameter refactoring.
@@ -284,8 +279,6 @@ python.refactoring.menu.finish.refactoring=To complete refactoring, you need to
 python.rename.press.rename=Press {0} to rename field {1} (e.g., to {2}).
 python.rename.expand.dynamic.references=In simple cases {0} will just rename without confirmation. \
   But in this sample, {0} detects two calls of {1} method for objects with unknown types. Expand {2} item.
-#TODO: This prefix can be got from some general bundle when "Dynamic" will be extracted from `BaseRefactoringProcessor.createPresentation`
-python.rename.dynamic.references.prefix=Dynamic references
 python.rename.exclude.item=It seems {0} should be excluded from rename. Select it and press {1}.
 python.rename.finish.refactoring=Now just finish the rename with the {0} button.
 
@@ -307,7 +300,7 @@ ruby.postfix.completion.apply=Now just press {0} to choose the first postfix tem
 ruby.postfix.completion.choose.target=Now choose the second item, {0}.
 
 ruby.class.search.lesson.name=Class Search
-ruby.class.search.invoke.goto.class=Try to find a class with {0}
+ruby.class.search.invoke.goto.class=Try to find a class with {0}.
 ruby.class.search.type.word=Type {0} to see classes that contain the word {1}.
 ruby.class.search.type.second.prefix=You can search for a class by part of its name. \
   Type {0} (the search string will be {1}) to see classes that contain the words {2} and {3}.
index ccdb23f3286dde7ae4c9ddaa41efc1ee8608cfa3..66d067a452d37b3d1fd0155b93aa9c26b72e55a3 100644 (file)
@@ -11,6 +11,7 @@ import com.intellij.openapi.util.SystemInfo
 import com.intellij.testGuiFramework.framework.GuiTestUtil
 import com.intellij.testGuiFramework.impl.jList
 import com.intellij.testGuiFramework.util.Key
+import training.learn.LearnBundle
 import training.learn.LessonsBundle
 import training.learn.interfaces.Module
 import training.learn.lesson.kimpl.KLesson
@@ -37,7 +38,7 @@ class GotoActionLesson(module: Module, lang: String, private val sample: LessonS
       }
       actionTask("About") {
         LessonsBundle.message("goto.action.invoke.about.action", LessonUtil.productName,
-                              strong(LessonsBundle.message("goto.action.about.word")), LessonUtil.rawEnter())
+                              LessonUtil.actionName(it).toLowerCase(), LessonUtil.rawEnter())
       }
       task {
         text(LessonsBundle.message("goto.action.to.return.to.the.editor", action("EditorEscape")))
@@ -61,7 +62,7 @@ class GotoActionLesson(module: Module, lang: String, private val sample: LessonS
         LessonsBundle.message("goto.action.invoke.again", action(it))
       }
       val showLineNumbersName = IdeBundle.message("label.show.line.numbers")
-      task(LessonsBundle.message("goto.action.show.line.input.required")) {
+      task(LearnBundle.message("show.line.number.prefix.to.show.first")) {
         text(LessonsBundle.message("goto.action.show.line.numbers.request", strong(it), strong(showLineNumbersName)))
         triggerByListItemAndHighlight { item ->
           item.toString().contains(showLineNumbersName)
index 1de4e6b999f3ca5814c51f4444dc2be28a279122..79e595023af3f1694c3ab5e722750c0c83a194d5 100644 (file)
@@ -3,6 +3,7 @@ package training.learn.lesson.general
 
 import training.commands.kotlin.TaskContext
 import training.commands.kotlin.TaskRuntimeContext
+import training.learn.LearnBundle
 import training.learn.LessonsBundle
 import training.learn.interfaces.Module
 import training.learn.lesson.kimpl.KLesson
@@ -69,7 +70,7 @@ abstract class SurroundAndUnwrapLesson(module: Module, lang: String)
       task {
         restoreByUi()
         text(LessonsBundle.message("surround.and.unwrap.choose.unwrap.item",
-                                   strong(LessonsBundle.message("surround.and.unwrap.item", surroundItems[0]))))
+                                   strong(LearnBundle.message("surround.and.unwrap.item", surroundItems[0]))))
         stateCheck {
           editor.document.charsSequence.let { sequence ->
             !surroundItems.any { sequence.contains(it) }
index 049f151983cb9a73146b20f6c0125c9f3b953418..69fb5889dbb991c79ff7fdfccf3bc7c8f97c624c 100644 (file)
@@ -13,6 +13,7 @@ import com.intellij.testGuiFramework.util.Key
 import com.intellij.ui.UIBundle
 import com.intellij.ui.table.JBTable
 import training.commands.kotlin.TaskRuntimeContext
+import training.learn.LearnBundle
 import training.learn.LessonsBundle
 import training.learn.interfaces.Module
 import training.learn.lesson.kimpl.KLesson
@@ -80,8 +81,7 @@ abstract class DeclarationAndUsagesLesson(module: Module, lang: String)
         }
         restoreByUi()
         text(LessonsBundle.message("declaration.and.usages.pin.motivation", strong(UIBundle.message("tool.window.name.find"))))
-        text(LessonsBundle.message("declaration.and.usages.right.click.tab",
-                                   strong(LessonsBundle.message("declaration.and.usages.tab.name"))))
+        text(LessonsBundle.message("declaration.and.usages.right.click.tab", strong(LearnBundle.message("usages.tab.name"))))
       }
 
       task("PinToolwindowTab") {
index 55b186ee831ff24298889db646534801692031dc..5544179d77440865ba93e6cbd3ad943ccef2acab 100644 (file)
@@ -6,6 +6,7 @@ import com.intellij.refactoring.rename.inplace.InplaceRefactoring
 import com.intellij.testGuiFramework.framework.GuiTestUtil
 import com.intellij.testGuiFramework.util.Key
 import training.commands.kotlin.TaskRuntimeContext
+import training.learn.LearnBundle
 import training.learn.LessonsBundle
 import training.learn.interfaces.Module
 import training.learn.lesson.kimpl.*
@@ -28,13 +29,13 @@ class PythonRefactorMenuLesson(module: Module)
       LessonsBundle.message("python.refactoring.menu.show.refactoring.list", LessonUtil.productName, action(it))
     }
     task(ActionsBundle.message("action.IntroduceParameter.text").dropMnemonic()) {
-      val prefix = LessonsBundle.message("python.refactoring.menu.required.prefix")
-      text(LessonsBundle.message("python.refactoring.menu.introduce.parameter", strong(it), strong(prefix)))
+      val filter = LearnBundle.message("refactoring.menu.introduce.parameter.filter")
+      text(LessonsBundle.message("python.refactoring.menu.introduce.parameter", strong(it), strong(filter)))
       triggerByUiComponentAndHighlight(highlightBorder = false, highlightInside = false) { ui: JList<*> ->
         ui.model.size > 0 && ui.model.getElementAt(0).toString().contains(it)
       }
       test {
-        type(prefix)
+        type(filter)
       }
     }
 
index 7d77a0ef6dbf76b3168571cc899881531e2077dd..53b87dc8e5033637b6ebcc4fc0041bc055982728 100644 (file)
@@ -14,6 +14,7 @@ import com.intellij.ui.tree.TreeVisitor
 import com.intellij.util.ui.tree.TreeUtil
 import org.jetbrains.annotations.Nullable
 import training.commands.kotlin.TaskTestContext
+import training.learn.LearnBundle
 import training.learn.LessonsBundle
 import training.learn.interfaces.Module
 import training.learn.lesson.kimpl.*
@@ -92,7 +93,7 @@ class PythonRenameLesson(module: Module)
           TreeUtil.collapseAll(tree, 1)
         }
       }
-      val dynamicReferencesString = LessonsBundle.message("python.rename.dynamic.references.prefix")
+      val dynamicReferencesString = LearnBundle.message("refactoring.dynamic.references.prefix")
       text(LessonsBundle.message("python.rename.expand.dynamic.references",
                                  LessonUtil.productName, code("teams"), strong(dynamicReferencesString)))