Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 29 additions & 5 deletions webview-ui/src/components/modes/ModesView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -601,10 +601,12 @@ const ModesView = ({ onDone }: ModesViewProps) => {
<Trans i18nKey="prompts:modes.createModeHelpText">
<VSCodeLink
href={buildDocLink("basic-usage/using-modes", "prompts_view_modes")}
style={{ display: "inline" }}></VSCodeLink>
style={{ display: "inline" }}
aria-label="Learn about using modes"></VSCodeLink>
<VSCodeLink
href={buildDocLink("features/custom-modes", "prompts_view_modes")}
style={{ display: "inline" }}></VSCodeLink>
style={{ display: "inline" }}
aria-label="Learn about customizing modes"></VSCodeLink>
</Trans>
</div>

Expand Down Expand Up @@ -1166,6 +1168,16 @@ const ModesView = ({ onDone }: ModesViewProps) => {
}}
/>
),
"0": (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding aria-label attributes to these VSCodeLink components for better accessibility. This helps screen reader users understand what these documentation links are for.

For example:
<VSCodeLink
href={buildDocLink(...)}
style={{ display: "inline" }}
aria-label="Learn about global custom instructions for modes"
/>

<VSCodeLink
href={buildDocLink(
"features/custom-instructions#global-rules-directory",
"prompts_mode_specific_global_rules",
)}
style={{ display: "inline" }}
aria-label="Learn about global custom instructions for modes"
/>
),
}}
/>
</div>
Expand Down Expand Up @@ -1291,7 +1303,8 @@ const ModesView = ({ onDone }: ModesViewProps) => {
"features/footgun-prompting",
"prompts_advanced_system_prompt",
)}
style={{ display: "inline" }}></VSCodeLink>
style={{ display: "inline" }}
aria-label="Read important information about overriding system prompts"></VSCodeLink>
),
"2": <strong />,
}}
Expand All @@ -1310,10 +1323,11 @@ const ModesView = ({ onDone }: ModesViewProps) => {
<Trans i18nKey="prompts:globalCustomInstructions.description">
<VSCodeLink
href={buildDocLink(
"features/custom-instructions#global-custom-instructions",
"features/custom-instructions#setting-up-global-rules",
"prompts_global_custom_instructions",
)}
style={{ display: "inline" }}></VSCodeLink>
style={{ display: "inline" }}
aria-label="Learn more about global custom instructions"></VSCodeLink>
</Trans>
</div>
<VSCodeTextArea
Expand Down Expand Up @@ -1352,6 +1366,16 @@ const ModesView = ({ onDone }: ModesViewProps) => {
}
/>
),
"0": (
<VSCodeLink
href={buildDocLink(
"features/custom-instructions#setting-up-global-rules",
"prompts_global_rules",
)}
style={{ display: "inline" }}
aria-label="Learn about setting up global custom instructions"
/>
),
}}
/>
</div>
Expand Down
4 changes: 2 additions & 2 deletions webview-ui/src/i18n/locales/ca/prompts.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions webview-ui/src/i18n/locales/de/prompts.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions webview-ui/src/i18n/locales/en/prompts.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"title": "Mode-specific Custom Instructions (optional)",
"resetToDefault": "Reset to default",
"description": "Add behavioral guidelines specific to {{modeName}} mode.",
"loadFromFile": "Custom instructions specific to {{mode}} mode can also be loaded from the <span>.roo/rules-{{slug}}/</span> folder in your workspace (.roorules-{{slug}} and .clinerules-{{slug}} are deprecated and will stop working soon)."
"loadFromFile": "Custom instructions specific to {{mode}} mode can also be loaded from the <span>.roo/rules-{{slug}}/</span> folder in your workspace or from the global <0>.roo/rules-{{slug}}/</0> (.roorules-{{slug}} and .clinerules-{{slug}} are deprecated and will stop working soon)."
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critical issue: This PR only updates the English translation file, but there are 17 other language files that need the same update. Without updating them, non-English users will see missing translation keys.

All translation files need the new "0" placeholder added to both customInstructions.loadFromFile (line 53) and globalCustomInstructions.loadFromFile (line 79).

Affected files:

  • locales/*/prompts.json (ca, de, es, fr, hi, id, it, ja, ko, nl, pl, pt-BR, ru, tr, vi, zh-CN, zh-TW)

},
"exportMode": {
"title": "Export Mode",
Expand All @@ -76,7 +76,7 @@
"globalCustomInstructions": {
"title": "Custom Instructions for All Modes",
"description": "These instructions apply to all modes. They provide a base set of behaviors that can be enhanced by mode-specific instructions below. <0>Learn more</0>",
"loadFromFile": "Instructions can also be loaded from the <span>.roo/rules/</span> folder in your workspace (.roorules and .clinerules are deprecated and will stop working soon)."
"loadFromFile": "Instructions can also be loaded from the <span>.roo/rules/</span> folder in your workspace or from the global <0>.roo/rules/</0> (.roorules and .clinerules are deprecated and will stop working soon)."
},
"systemPrompt": {
"preview": "Preview System Prompt",
Expand Down
4 changes: 2 additions & 2 deletions webview-ui/src/i18n/locales/es/prompts.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions webview-ui/src/i18n/locales/fr/prompts.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions webview-ui/src/i18n/locales/hi/prompts.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions webview-ui/src/i18n/locales/id/prompts.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions webview-ui/src/i18n/locales/it/prompts.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions webview-ui/src/i18n/locales/ja/prompts.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading