Skip to content
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

Dev.ej/translate route buttons #349

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

joanise
Copy link
Member

@joanise joanise commented Oct 3, 2024

PR Goal?

Right now, the Studio / Editor / Privacy buttons on the top right of the Studio and Editor are shown in English on the French and Spanish versions. This PR wants to translate them.

Feedback sought?

This should be rubber stamping, but the longer words for Privacy (Privacidad and, much worse, Confidentialité) make the buttons too wide. E.g., on iPhone SE:
fr image
es image
vs English image

At a more reasonable screen size, in English, you fully see the buttons down to 437 pixels wide, and that's perfectly acceptable, but in French you need at least 500 pixels wide to see "Confidentialité" in full. Is there a way to have each of the three buttons auto-shrink when they stop fitting? Ideally, each of the three words would be partially trimmed on the right so that you still see some of each button's text even on a narrow cell phone with 375 pixels wide.

Priority?

medium

How to test?

load the PR preview in each language and play with simulated narrow screens

Confidence?

still low because of the size problems

Version change?

no

Copy link

semanticdiff-com bot commented Oct 3, 2024

Review changes with SemanticDiff.

Analyzed 8 of 8 files.

Overall, the semantic diff is 10% smaller than the GitHub diff.

Filename Status
✔️ packages/studio-web/project.json Analyzed
✔️ packages/studio-web/src/i18n/messages.es.json 15.03% smaller
✔️ packages/studio-web/src/i18n/messages.fr.json 14.04% smaller
✔️ packages/studio-web/src/i18n/messages.json 23.58% smaller
✔️ packages/studio-web/src/app/app.component.html 7.87% smaller
✔️ packages/studio-web/src/app/material.module.ts Analyzed
✔️ packages/studio-web/src/app/shepherd.steps.ts Analyzed
✔️ packages/studio-web/src/app/editor/editor.component.html 4.35% smaller

@joanise joanise requested a review from deltork October 3, 2024 16:39
@joanise joanise changed the base branch from main to dev.del/join-studio-and-editor-tours October 3, 2024 16:40
Copy link
Contributor

github-actions bot commented Oct 3, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://ReadAlongs.github.io/Studio-Web/pr-preview/pr-349/
on branch gh-pages at 2024-10-21 21:28 UTC

Base automatically changed from dev.del/join-studio-and-editor-tours to main October 4, 2024 14:44
@joanise joanise force-pushed the dev.ej/translate-route-buttons branch from 84c89bb to 9c3043a Compare October 9, 2024 16:05
@joanise joanise force-pushed the dev.ej/translate-route-buttons branch from 9c3043a to e34ba41 Compare October 18, 2024 20:25
@joanise joanise changed the base branch from main to dev.ej/redo-connect-tours October 18, 2024 20:26
@joanise
Copy link
Member Author

joanise commented Oct 18, 2024

Rebased this PR to the reverted main branch so it can be reviewed properly. It's on top of other PRs, but should still be reviewed by itself.

@joanise
Copy link
Member Author

joanise commented Oct 18, 2024

And it still needs a solution for seeing all three buttons when the text is wider, in French and Spanish, as I initially commented.

@roedoejet
Copy link
Collaborator

Yes, there's a way to do that. at a minimum we could put overflow: scroll; on the toolbar which would allow people to scroll. However I think maybe a better thing to do would be to collapse the toolbar into a ☰ icon for small viewports which expands a menu when clicked. I.e. https://material.angular.io/components/menu/overview. I've made a PR here for this.

Base automatically changed from dev.ej/redo-connect-tours to main October 21, 2024 14:39
@joanise
Copy link
Member Author

joanise commented Oct 21, 2024

Thanks @roedoejet for this suggestion. I've merged it here, with some improvements Del suggested.

I think this PR is now ready to review, and hopefully to merge, although I'll clean up the commit history before I do so.

joanise and others added 5 commits October 21, 2024 17:22
* style: put each hamburger item on its own line

* feat: give the Studio button the home mat-icon

Excellent PR review suggestion by Del.

* refactor: exclude the icons from the i18n elements in the top menu
@joanise joanise force-pushed the dev.ej/translate-route-buttons branch from 8c2b40a to a674238 Compare October 21, 2024 21:25
"maximumWarning": "500kb",
"maximumError": "2mb"
"maximumWarning": "1500kb",
"maximumError": "3mb"
Copy link
Member Author

Choose a reason for hiding this comment

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

We were busting our 2mb budget deploying this, I think it's reasonable to go to 3mb, that's still reasonably small.

@@ -6,7 +6,7 @@
<h1 i18n="Welcome message for app editor" id="welcome-header">
Welcome to the ReadAlong Studio Editor
</h1>
<p>
<p i18n="Editor synopsis">
Copy link
Member Author

@joanise joanise Oct 21, 2024

Choose a reason for hiding this comment

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

Only loosely related to the rest of this PR: I noticed this text was still in English on the fr and es versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants