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

[Feat] Automatically suggest a translation key based on marked text / cursor #88

Open
Jeehut opened this issue Mar 14, 2023 · 0 comments
Assignees
Labels
Feature Request New functionality the app doesn't provide yet

Comments

@Jeehut
Copy link
Member

Jeehut commented Mar 14, 2023

Problem Statement

Currently, the workflow enforces users to mark a text, press their preferred shortcut to open the Add Translation Window, and then type a key of their preference. Often times, especially in SwiftUI views, the semantic key is actually named very similar to the views the text is contained in, but the developer has to still think about a good semantic key and type it out.

Suggested Solution

RemafoX could suggest a key automatically and somehow allow the developer to simply 'review' it and confirm it without having to think about a new key or type anything. For example, when a SwiftUI view was named ActivitiesListView and the text was contained in a semantical SwiftUI view (property) like .navigationTitle("Activities"), the suggested key could be: "ActivitiesList.Navigation.Title", or for a Section when the text was within a footer: it could suggest "ActivitiesList.SomeSection.Footer".

Additional Considerations

This feature should go hand in hand with #22 and UX-wise it could be built into the auto-completion dropdown as an extra option before the user typed anything. Multiple options could be provided.

Additionally, also the "last used" key could be provided in the dropdown, maybe by removing the last component. E.g. if last ActivityForm.StateSection.Title was used, the autocomplete could provide ActivityForm.StateSection..

Note: This feature was first initially by @NickAtGit.

@Jeehut Jeehut added the Feature Request New functionality the app doesn't provide yet label Mar 14, 2023
@Jeehut Jeehut self-assigned this Mar 14, 2023
@Jeehut Jeehut changed the title [Feat] Automatically suggest a semantic translation key based on position of marked text [Feat] Automatically suggest a translation keys based on marked text Mar 14, 2023
@Jeehut Jeehut changed the title [Feat] Automatically suggest a translation keys based on marked text [Feat] Automatically suggest a translation key based on marked text / cursor pos Mar 14, 2023
@Jeehut Jeehut changed the title [Feat] Automatically suggest a translation key based on marked text / cursor pos [Feat] Automatically suggest a translation key based on marked text / cursor Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New functionality the app doesn't provide yet
Projects
None yet
Development

No branches or pull requests

1 participant