-
-
Notifications
You must be signed in to change notification settings - Fork 437
Let CSS do the uppercase transformation. #1521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears the remaining two uppercase strings can also be switched to normal case and the existing code will handle the styling:
Line 67 in cdae301
{nls.localize('cloud/GoToCloud', 'GO TO CLOUD')} |
arduino-ide/arduino-ide-extension/src/browser/widgets/component-list/list-item-renderer.tsx
Line 83 in cdae301
{nls.localize('arduino/component/install', 'INSTALL')} |
OK. Let's do the cleanup everywhere. 👍 |
cdae301
to
f745a07
Compare
Expose no implementation details to translation files. Signed-off-by: Akos Kitta <[email protected]>
f745a07
to
55852f8
Compare
onClick={() => shell.openExternal('https://create.arduino.cc/editor')} | ||
> | ||
{nls.localize('cloud/GoToCloud', 'GO TO CLOUD')} | ||
{nls.localize('arduino/cloud/goToCloud', 'Go to Cloud')} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing the localization key from 'cloud/GoToCloud'
to 'arduino/cloud/goToCloud'
is right, but what about all the translations of this string? Like this we would lose them all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have also thought about the impact of prior changes to the keys. It was previously discussed here:
I think there is an impact, but it can't quite be described as "lose them" because the translations are still stored in the "translation memory" on Transifex. So they don't need to be translated over again from English, but I don't think this happens automatically, meaning there is still an impact. I believe the translators will still need to select the strings with changed keys and then accept the auto-completed translation offered by Transifex.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it seems to me that we should avoid frivolous key changes, but also shouldn't feel locked into the existing key names in cases where there is a significant benefit to restructuring them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the perfect time to make such changes. I do not want to maintain a key that does make sense in the next two decades.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Akos! I think comprehensively establishing this convention now will ensure the prior inconsistency doesn't end up being propagated into strings added over time and will improve the contributor experience for translators.
Motivation
Do not expose implementation details in the translation files. Related comment: #1341 (comment)
This PR is a follow-up of #1507. Use no
uppercase
letters. CSS will do the trick here and here.This PR also changes the default translations of the following UI labels as requested in #1521 (review):
GO TO CLOUD
->.Go to Cloud
, andINSTALL
->Install
,Change description
To verify:
INSTALL
although the translation file containsInstall
,INSTALLED
and notInstalled
for the items,INSTALLED
, you should seeUNINSTALL
(assuming your IDE2 language is English)GO TO CLOUD
is only visible if you are logged in to Arduino Create but do not have any cloud sketches. Ensuring zero remote sketches was difficult as the Create editor forced me to have at least one sketch, but I found a glitch and could workaround this behavior. When there is a single sketch, delete it, reload the page, and delete it again, then Create Editor fails to create a new resource. Here is a screencast with the steps:deleta_all_create_sketch.mp4
Here are the changes in action in IDE2:
INSTALL
/INSTALLED
/UNINSTALL
:install_installed_uninstall_uppercase.mp4
GO TO CLOUD
:go_to_cloud.mp4
Other information
No behavioral changes are expected.
Reviewer checklist