mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
[IFT] Make possible to provide custom langName to get the feedback link
Sometimes feedback link suffix can differ from the language ID. For example, in C# language ID is 'C#', but link suffix is 'csharp'. GitOrigin-RevId: 10305853a225c9bf10b5b133656137de5c1d61e0
This commit is contained in:
committed by
intellij-monorepo-bot
parent
60a3a3ddaf
commit
a146d41a4e
@@ -131,9 +131,12 @@ fun isLearningProject(project: Project, languageId: String): Boolean {
|
||||
}
|
||||
|
||||
fun getFeedbackLink(langSupport: LangSupport, ownRegistry: Boolean): String? {
|
||||
val suffix = langSupport.primaryLanguage.toLowerCase()
|
||||
val needToShow = Registry.`is`("ift.show.feedback.link" + if (ownRegistry) ".$suffix" else "", false)
|
||||
return if (needToShow) "https://surveys.jetbrains.com/s3/features-trainer-feedback-$suffix" else null
|
||||
return getFeedbackLink(langSupport.primaryLanguage.lowercase(), ownRegistry)
|
||||
}
|
||||
|
||||
fun getFeedbackLink(langName: String, ownRegistry: Boolean): String? {
|
||||
val needToShow = Registry.`is`("ift.show.feedback.link" + if (ownRegistry) ".$langName" else "", false)
|
||||
return if (needToShow) "https://surveys.jetbrains.com/s3/features-trainer-feedback-$langName" else null
|
||||
}
|
||||
|
||||
val switchOnExperimentalLessons: Boolean
|
||||
|
||||
Reference in New Issue
Block a user