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

Menu item to choose which language to translate from #255

Open
2 tasks done
andrewtavis opened this issue Dec 1, 2022 · 25 comments
Open
2 tasks done

Menu item to choose which language to translate from #255

andrewtavis opened this issue Dec 1, 2022 · 25 comments
Assignees
Labels
feature New feature or request help wanted Extra attention is needed

Comments

@andrewtavis
Copy link
Member

andrewtavis commented Dec 1, 2022

Terms

Description

This issue is to add a menu option to the Scribe app where the user would be able to select which language they're translating from. Designs of this feature can be seen on Figma.

Contribution

I'll work on this after we have a working menu, but would love to get some support!

@andrewtavis andrewtavis added feature New feature or request help wanted Extra attention is needed blocked Another issue is blocking labels Dec 1, 2022
@roshansingh12
Copy link

Hi @andrewtavis I will love to support you in this issue. To add menu option to change user preferred language. Please let me know if I can help you. Thank you

@andrewtavis
Copy link
Member Author

Hey @roshansingh12! Thanks so much for your interest in Scribe! This issue is currently blocked by #16, which should be resolved in the coming months but is quite the issue to tackle. Could I make a suggestion of another localization issue for you to start and then we can maybe get back to this one later?

All the best 😊

@roshansingh12
Copy link

Thanks @andrewtavis,Yes Sure let me know if there any other issue I would like to help you on them.

@andrewtavis
Copy link
Member Author

Thanks, @roshansingh12! Maybe #260 or #9 / #120 would be good places to start, with the latter two being localization focused :) Maybe it’d be good to get Crowdin set up for Scribe, which is a localization service that would allow people to directly commit new texts for the app 🤔😊

@andrewtavis
Copy link
Member Author

andrewtavis commented Apr 29, 2023

Similarly to #299 where we're discussing an icon that shows up on the command bar once the user starts typing in order to indicate that autocomplete is possible — when implemented — before the user starts typing we could also have a settings icon on the right side of the translate prompt that would take the user to translate settings including which language to translate from.

  • This should be made into a separate issue

@andrewtavis andrewtavis added the GSoC Available for Google Summer of Code participants label May 21, 2023
@andrewtavis andrewtavis removed the GSoC Available for Google Summer of Code participants label May 21, 2023
@andrewtavis andrewtavis removed the blocked Another issue is blocking label Jun 12, 2023
@Francisco0561
Copy link

Hi Andrew, I was wonder If I am able to work on this feature?

@andrewtavis
Copy link
Member Author

Hey @Francisco0561! Thanks for your interest in Scribe and wanting to help out :) This would be a fine issue to work on as we're helping another contributor with a similar issue right now 😊 I'll ping @SaurabhJamadagni to so he has some overview as well and can help answer questions! Please let us know if you need any help!

@Francisco0561
Copy link

Francisco0561 commented Oct 15, 2023

I was just wondering, this is the style I saw on the dark mode mockups on figma, but I saw that it was different on the light version. I was just wondering which one you would prefer? Also for the label on the left side of the chevron, I made it part of the ParentTabelCellModel, I made it didn't need to be added, to every single ParentTabelCellModel, it would just default to false, and could be set to true if a label was needed, since I saw that it was in element in other sections of settings, if that is okay.
I am still working on this feature, I just set the section state to the .autosuggestemojis right now so I could make and see the label and make sure it worked properly.

Screenshot 2023-10-15 at 1 33 36 PM

@Francisco0561
Copy link

This I what I mean, as you can see the first section does not have the hasLabel, it just default to false, and could be set to true if the label was needed. I set some of the other stuff to things that were already there just so I could test the label, that it would show up properly at the moment.

Screenshot 2023-10-15 at 1 45 01 PM

@andrewtavis
Copy link
Member Author

Hey @Francisco0561! Looking good so far! I think that some formatting is going to be needed for the label, but we can potentially take care of that later 😊 We'll ultimately need to pass the current translation language as a variable there. Aside from that, note that the section should be Translation source language and the label should be System language.

As far as color is concerned, it would ideally react to light and dark mode. We can help a bit with that if need be :)

@Francisco0561
Copy link

Thank you @andrewtavis, I was wondering if you might be able to point me in the right direction? the problem that I am have having is figuring out where to start after doing the label next to the chevron. Thank you!

@andrewtavis
Copy link
Member Author

Hey @Francisco0561 :) Let me check into this a bit and get back to you. We definitely need to have a variable that's saving all the translation source languages and then have this be updated based on the user selections. This would then be referenced by the label there.

@SaurabhJamadagni
Copy link
Collaborator

Hey @Francisco0561, sorry I was a bit busy and couldn't help out. The hasLabel parameter that doesn't require a value always is a really nice addition. I think we could do that for the hasToggle too right @andrewtavis ?

For passing the language to the label I think we could use the languagesAbbrDict from the Keyboards/KeyboardBase/InterfaceVariables.swift file. We could maybe have nested enumerations there like we have for sectionState. Then pass the language abbreviation there and conditionally render the label using the dictionary. Would that be a good idea? Let me know what you all think.

@Francisco0561
Copy link

Francisco0561 commented Oct 18, 2023

Hi @SaurabhJamadagni, No worries! When, I was looking through the project, I had the same Idea to use the languagesAbbrDict. Would that be implemented in the hasDynamicType, that would pull all the available languages? Then, the logic for the what is the current selected language would go in a sectionsState?. Just making sure I understand the function of sectionState and the hasDynamicType correctly. Thank you!

@SaurabhJamadagni
Copy link
Collaborator

Hey @Francisco0561, that is an interesting point. I hadn't really thought about the dynamic nature of this list. In my head, I assumed all the available Scribe languages could be there as the aspect of downloading only the required languages completely slipped my mind. The functionality you have mentioned seems right. I would say that would be the way to go forward. Thanks for bringing it to my attention as well.

@SaurabhJamadagni
Copy link
Collaborator

Could we also explore one more workaround for this? What if we stored the installed keyboards in an array? Because pulling information about the installed keyboards came with a few bugs that are yet to be resolved. So if we can avoid that, that could be helpful. We can then update the array when the dynamic list is updated. That could be a separate issue if necessary. What do you think @andrewtavis and @Francisco0561?

@andrewtavis
Copy link
Member Author

Let's discuss this in the dev sync, @SaurabhJamadagni 😊 Thanks for the thoughts on all this both of you! @Francisco0561, we have a call at 14:00 UTC that you'd be welcome to attend if you'd be interest. Details for that are on our General channel on Matrix :)

@Francisco0561
Copy link

@andrewtavis and @SaurabhJamadagni, Sorry I was not able to attend I was help my brother purchase a car. If you guys talked about it, I would love to know what your guys thoughts on the best way to tackle this feature. Thank you, and sorry again for missing the meeting.

@Francisco0561
Copy link

@SaurabhJamadagni and @andrewtavis, I was wondering if I am able to separate out the UI Label that is next to the chevron, since it is something that is going to be refused in other other parts of the app, just make a separate issue/feature so, I am able to do a pull request for it. Since I have most of that code down and it is something reusable through the app.

@andrewtavis
Copy link
Member Author

Hey @Francisco0561 :) Sorry for the wait on this. I've been a bit slammed over the last few weeks and I think that @SaurabhJamadagni is as well. No worries on missing the sync at all! We have the next one on Saturday as stated in the General channel on Matrix. That's where the details are as well :)

Your solution sounds good to me 😊 Feel free to make a PR and I'll check it/we can discuss it in the sync!

@SaurabhJamadagni
Copy link
Collaborator

Hey @Francisco0561!

separate out the UI Label that is next to the chevron,

This seems like a good idea. Having the label reusable will be very helpful as it can be used for the keyboard layout and currency selection cells.

image

I am still not sure as to what is the best way to list languages in the translation list. Sorry, we weren't able to discuss it in the last dev sync. We'll definitely discuss this today and let you know in this thread (cc: @andrewtavis). You are welcome to join the sync! Your input would be very valuable 😊

Sorry that this has been delayed. I am just not sure about dynamically pulling the installed keyboards list until the previous workaround for another issue has been ironed out. Thank you for taking the time to work on this issue.

@andrewtavis
Copy link
Member Author

Hey @Francisco0561 👋 @SaurabhJamadagni and I discussed this during the dev sync today. Your suggestion of separating it out makes sense to us. Eventually we're going to have users who download a specific pack where the source language is included, so we need to be able to derive what languages are available dynamically. I don't think we need to open a new issue, but feel free to send along a PR and we can both review in there 😊

@andrewtavis
Copy link
Member Author

@Jag-Marcel, same here, can you write in so we can assign :)

@Jag-Marcel
Copy link
Member

👍

@andrewtavis
Copy link
Member Author

andrewtavis commented Jun 20, 2024

From the discussion that @Jag-Marcel, @henrikth93 and I are having now, what we need here is:

  • The existing cells need to be expanded to allow for the label on the right side next to the radio button or chevron
  • We need a table view that allows for radio button selection
    • There will be a new issue for this that I'll link to here
    • Add radio button menu option selection table #470
    • Each cell needs a label to the left, a radio button to the right and another text field to the left of the radio button where we can put descriptions or emojis (QWERTY, 👋)
    • Cells do not need descriptions
  • Another layer in the storyboard file that's within the "settings chain"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request help wanted Extra attention is needed
Projects
Status: In Progress
Development

No branches or pull requests

5 participants