extensions
extensions copied to clipboard
[Aleph Tools] ... efficient feature
Extension
https://www.raycast.com/d7mtg/aleph
Description
An option to select the last written text, identify the language and paste the opposite language.
For example, I start to written in Hebrew an English word or sentence: עםםעךק דקשרבי google search attached it single keystroke that identify the language by the regex or characters (hebrewRegex = /[\u0590-\u05FF]/) then after identify the language it will use the existing functions to switch the language usinge simple if statement.
Optional (using ⌘+⇧+← or ⌘ + A to select the relevant text in the command can be change in raycast menu).
Who will benefit from this feature?
Everyone, The tool was prepared to quickly correct typos caused by forgetting to switch languages, this way in raycast you can add keystroke to activate the fix as soon as you notice it.
Anything else?
No response
Thank you for opening this issue!
🔔 @d7mtg you might want to have a look.
💡 Author and Contributors commands
The author and contributors of d7mtg/aleph can trigger bot actions by commenting:
@raycastbot close this issueCloses the issue.@raycastbot close as not plannedCloses the issue as not planned.@raycastbot rename this issue to "Awesome new title"Renames the issue.@raycastbot reopen this issueReopens the issue.@raycastbot assign meAssigns yourself to the issue.@raycastbot good first issueAdds the "Good first issue" label to the issue.@raycastbot keep this issue openMake sure the issue won't go stale and will be kept open by the bot.
@DanSega1 what do you think should happen to a mixed string?
I think there is 2 method:
-
you can take the copied text as one string, put it in a function to identify the language and (Hebrew or Latin in this case) and then choose with if statement is need to go to Hebrew → Latin or Latin → Hebrew. I think this is the easiest to apply because most of the time you fix it after you typed and check the screen.
-
separate each letter and identify the language and change it letter by letter, it will take longer to process, but will have better result in case of mixed string. I think this way can be a flag for a niche user base, also can be checked before all the process if the string is mixed.
I created a python function you can check for reference, I'm not familiar with JavaScript and typescript.
#!/usr/bin/env python3
import sys
import re
def detect_language(text):
# hebrew Unicode range
hebrew_pattern = re.compile(r'[\u0590-\u05FF]')
# check for hebrew characters
if hebrew_pattern.search(text):
print("hebrew")
else:
print("latin")
if __name__ == "__main__":
# read input text from standard input
input_text = sys.stdin.read()
detect_language(input_text)
the code identify strings by the letters in Unicode range: 0590–05FF.
This issue has been automatically marked as stale because it did not have any recent activity.
It will be closed if no further activity occurs in the next 10 days to keep our backlog clean 😊
This issue has been automatically closed due to inactivity.
Feel free to comment in the thread when you're ready to continue working on it 🙂
You can also catch us in Slack if you want to discuss this.