Escanea con tu iPhone para instalar
Vista previa
EN:Translate
TR:Çeviri
Novedades
Versión 1.0
First release
Qué hace
96 acciones-
CommentMade by u/brechtbakker Version 2.9.5 Made on iOS 14 Thanks to u/danboy4 for the list of countries used in this Shortcut
-
CommentFor use with other Shortcuts please check the examples on: https://routinehub.co/shortcut/254 You need a Dictionary as input to this Shortcut containing keys 'Text' and 'Language'. Text would be the text you'd want to translate and the language woul…
-
If
-
Get Dictionary from Input
-
Get Dictionary Value
-
Count
-
If
-
Number
-
Set VariableExternal
-
Set VariableInput Language
-
Set VariableUse UpdateKit
-
Get Variable
-
If
-
Get Variable
-
If
-
Text
-
Choose from Menu…
-
Choose from MenuClipboard
-
Get Clipboard
-
Choose from MenuEnter text...
-
Ask for InputPlease enter text to translate
-
CommentThis is a list of favourites, please be sure to enter the favourites the same way they are found in the 'Languages' list below!
-
Text
-
Text
-
Text
-
Split Text
-
Replace Text
-
Set VariableFavourites
-
Text
-
Split Text
-
Set VariableLanguages
-
Text
-
Split Text
-
Set VariableShort Names
-
Text
-
Base64 Encode
-
Get Dictionary from Input
-
Set VariableLanguage Dictionary
-
Count
-
If
-
Get Variable
-
If
-
Choose from List
-
If
-
Choose from List
-
Change Case
-
Get Dictionary Value
-
Replace Text
-
Replace Text
-
Dictionary
-
Get Dictionary Value
-
Repeat with Each
-
Get Dictionary Value
-
Count
-
If
-
Get Dictionary Value
-
Repeat with Each
-
Text
-
If
-
Text
-
Combine Text
-
URLhttps://translate.google.com/translate_a/single?…
-
Get Contents of Web Page
-
Text
-
Base64 Encode
-
URLdata:text/html;base64,…
-
Get Contents of Web Page
-
URL Encode
-
Set VariableTranslation
-
Get Variable
-
If
-
If
-
Text
-
Choose from Menu…
-
Choose from MenuShare...
-
Share
-
Choose from MenuCopy to Clipboard
-
Copy to Clipboard
-
Choose from MenuCheck for update
-
Number
-
Set VariableUse UpdateKit
-
If
-
Dictionary
-
URLdata:text/html,<script> let xhr = new XMLHttpRequest() xhr.open('GET', '…/versions/latest', false) xhr.send() document.write(xhr.responseText) </script>
-
Get Contents of Web Page
-
If
-
Get Text from Input
-
Get Dictionary Value
-
If
-
Text
-
Choose from Menu…
-
Choose from MenuDownload Update
-
URL
-
Open URLs
-
Choose from MenuNot now
-
Text
Ver como código
Todas las acciones de este atajo escritas en Cherri, un lenguaje de programación para Atajos. Ideal para aprender cómo funciona.
#include 'actions/web'
#include 'actions/text'
#include 'actions/sharing'
#define color violet
#define glyph globe
/*
Made by u/brechtbakker
Version 2.9.5
Made on iOS 14
Thanks to u/danboy4 for the list of countries used in this Shortcut
*/
/*
For use with other Shortcuts please check the examples on:
https://routinehub.co/shortcut/254
You need a Dictionary as input to this Shortcut containing keys 'Text' and 'Language'. Text would be the text you'd want to translate and the language would be the language to translate to
*/
if ShortcutInput {
const Settings = getDictionary(ShortcutInput)
const Text = getValue(Settings, "Text")
const Count = count(Text, "Characters")
if Count > 0 {
@External = 1
@InputLanguage = Settings['Language']
@UseUpdateKit = Settings['UpdateKit']
// TODO: Get Variable not supported: Assign variable here to 'Settings['Text']'.
} else {
// TODO: Get Variable not supported: Assign variable here to 'ShortcutInput'.
}
} else {
const Text1 = "What would you like to Translate?"
menu Text1 {
item "Clipboard":
getClipboard()
item "Enter text...":
prompt("Please enter text to translate")
}
}
// This is a list of favourites, please be sure to enter the favourites the same way they are found in the 'Languages' list below!
const Favs = "English\nSpanish\nFrench"
const Other = "Other..."
const Text2 = "{Favs}\n{Other}"
splitText(Text2)
replaceText("(?m)^\s+|\s+$", "", false, true)
@Favourites
const Text3 = "Afrikaans\nAlbanian\nAmharic\nArabic\nArmenian\nAzerbaijani\nBasque\nBelarusian\nBengali\nBosnian\nBulgarian\nCatalan\nCebuano\nChichewa\nChinese\nChinese (Traditional)\nCorsican\nCroatian\nCzech\nDanish\nDutch\nEnglish\nEsperanto\nEstonian\nFilipino\nFinnish\nFrench\nFrisian\nGalician\nGeorgian\nGerman\nGreek\nGujarati\nHaitian Creole\nHausa\nHawaiian\nHebrew\nHindi\nHmong\nHungarian\nIcelandic\nIgbo\nIndonesian\nIrish\nItalian\nJapanese\nJavanese\nKannada\nKazakh\nKhmer\nKorean\nKurdish (Kurmanji)\nKyrgyz\nLao\nLatin\nLatvian\nLithuanian\nLuxembourgish\nMacedonian\nMalagasy\nMalay\nMalayalam\nMaltese\nMaori\nMarathi\nMongolian\nMyanmar (Burmese)\nNepali\nNorwegian\nPashto\nPersian\nPolish\nPortuguese\nPunjabi\nRomanian\nRussian\nSamoan\nScots Gaelic\nSerbian\nSesotho\nShona\nSindhi\nSinhala\nSlovak\nSlovenian\nSomali\nSpanish\nSundanese\nSwahili\nSwedish\nTajik\nTamil\nTelugu\nThai\nTurkish\nUkrainian\nUrdu\nUzbek\nVietnamese\nWelsh\nXhosa\nYiddish\nYoruba\nZulu"
splitText(Text3)
@Languages
const Text4 = "af\nsq\nam\nar\nhy\naz\neu\nbe\nbn\nbs\nbg\nca\nceb\nny\nzh-CN\nzh-TW\nco\nhr\ncs\nda\nnl\nen\neo\net\ntl\nfi\nfr\nfy\ngl\nka\nde\nel\ngu\nht\nha\nhaw\niw\nhi\nhmn\nhu\nis\nig\nid\nga\nit\nja\njw\nkn\nkk\nkm\nko\nku\nky\nlo\nla\nlv\nlt\nlb\nmk\nmg\nms\nml\nmt\nmi\nmr\nmn\nmy\nne\nno\nps\nfa\npl\npt\npa\nro\nru\nsm\ngd\nsr\nst\nsn\nsd\nsi\nsk\nsl\nso\nes\nsu\nsw\nsv\ntg\nta\nte\nth\ntr\nuk\nur\nuz\nvi\ncy\nxh\nyi\nyo\nzu"
splitText(Text4)
@ShortNames
const Text5 = "eyJNYXJhdGhpIjoibXIiLCJadWx1IjoienUiLCJIYXdhaWlhbiI6ImhhdyIsIkN6ZWNoIjoiY3MiLCJTZXNvdGhvIjoic3QiLCJTbG92ZW5pYW4iOiJzbCIsIlN3YWhpbGkiOiJzdyIsIlV6YmVrIjoidXoiLCJGcmlzaWFuIjoiZnkiLCJTbG92YWsiOiJzayIsIkZp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dpc2giOiJsYiIsIldlbHNoIjoiY3kiLCJKYXZhbmVzZSI6Imp3IiwiSGVicmV3IjoiaXciLCJDaGluZXNlIjoiemgtQ04iLCJCYXNxdWUiOiJldSIsIkt5cmd5eiI6Imt5IiwiTWFsYXkiOiJtcyIsIkxhdHZpYW4iOiJsdiIsIlNlcmJpYW4iOiJzciIsIlBvbGlzaCI6InBsIiwiVXJkdSI6InVyIiwiU2luZGhpIjoic2QiLCJTb21hbGkiOiJzbyIsIkNlYnVhbm8iOiJjZWIiLCJQdW5qYWJpIjoicGEiLCJZb3J1YmEiOiJ5byIsIktvcmVhbiI6ImtvIiwiQ29yc2ljYW4iOiJjbyIsIklnYm8iOiJpZyIsIkNoaW5lc2UgKFRyYWRpdGlvbmFsKSI6InpoLVRXIiwiUm9tYW5pYW4iOiJybyIsIkt1cmRpc2ggKEt1cm1hbmppKSI6Imt1IiwiR3JlZWsiOiJlbCIsIkJlbmdhbGkiOiJibiIsIlZpZXRuYW1lc2UiOiJ2aSIsIkxpdGh1YW5pYW4iOiJsdCIsIkthemFraCI6ImtrIiwiTWFjZWRvbmlhbiI6Im1rIiwiRnJlbmNoIjoiZnIiLCJJY2VsYW5kaWMiOiJpcyIsIk1hbGFnYXN5IjoibWciLCJIYWl0aWFuIENyZW9sZSI6Imh0IiwiQmVsYXJ1c2lhbiI6ImJlIiwiTmVwYWxpIjoibmUiLCJNYWx0ZXNlIjoibXQiLCJKYXBhbmVzZSI6ImphIiwiU2NvdHMgR2FlbGljIjoiZ2QiLCJIbW9uZyI6ImhtbiIsIlRhamlrIjoidGciLCJLYW5uYWRhIjoia24iLCJUYW1pbCI6InRhIiwiWGhvc2EiOiJ4aCJ9"
const Base64Encoded = base64Encode(Text5)
getDictionary(Base64Encoded)
@LanguageDictionary
const Count1 = count(@InputLanguage, "Characters")
if Count1 > 0 {
// TODO: Get Variable not supported: Assign variable here to '@InputLanguage'.
} else {
const SelectedItem = chooseFromList(@Favourites, "Please select language to translate to")
if SelectedItem contains Other {
chooseFromList(@Languages, "Please select language to translate to")
}
}
const Language1 = uppercase(Language)
const LanguageShortName = @LanguageDictionary[Language1]
replaceText("\", "\\", Input, false)
replaceText("[<&`\">]", "", false, true)
const Dictionary = {
"client": "gtx",
"dt": [
"at",
"bd",
"ex",
"ld",
"md",
"qca",
"rw",
"rm",
"ss",
"t"
],
"hl": "{LanguageShortName}",
"ie": "UTF-8",
"kc": 7,
"oe": "UTF-8",
"otf": 1,
"q": "{}",
"sl": "auto",
"ssel": 0,
"tk": "000000.000000",
"tl": "{LanguageShortName}",
"tsel": 0
}
const DictionaryValue = getKeys(Dictionary)
for _ in DictionaryValue {
const Values = getValue(Dictionary, @RepeatItem)
const Count2 = count(Values, "Items")
if Count2 > 1 {
const DictionaryValue1 = getValue(Dictionary, @RepeatItem)
for _ in DictionaryValue1 {
}
} else {
}
}
joinText(RepeatResults, "&")
url("https://translate.google.com/translate_a/single?{}")
getWebpageContents()
const Text6 = "<!doctype html><html><head><meta charset=\\"utf-8\\"></head><body><script>var t=`{}`.replaceAll(/[\t\n\r]+/gm,' ');var r=/\[(.*)\]/s;var s=r.exec(t)[0];s=s.replace('',' ');var b=JSON.parse(s);var re=\\"\\";b[0].forEach(function(obj){if(obj[0]){re+=obj[0];}});document.write(re);</script></body></html>"
base64Encode(Text6)
url("data:text/html;base64,{}")
getWebpageContents()
urlEncode()
@Translation
// TODO: Get Variable not supported: Assign variable here to '@External'.
if @External == 0 {
} else {
const Text7 = "Translation results\n—————————\n{@Translation}"
menu Text7 {
item "Share...":
share(@Translation)
item "Copy to Clipboard":
setClipboard(@Translation, "")
item "Check for update":
}
@UseUpdateKit = 1
}
if @UseUpdateKit == "1" {
const Dictionary1 = {
"Current Version": "2.9.5",
"RoutineHub ID": 254,
"Shortcut Name": "Google Translate",
"URL": "https://routinehub.co/api/v1/shortcuts/254"
}
url("data:text/html,<script>\nlet xhr = new XMLHttpRequest()\nxhr.open('GET', '{Dictionary1['URL']}/versions/latest', false)\nxhr.send()\ndocument.write(xhr.responseText)\n</script>")
const ContentsOfWebPage = getWebpageContents()
if ContentsOfWebPage {
const Text8 = getText(ContentsOfWebPage)
const DictionaryValue2 = getValue(Text8, "Version")
if DictionaryValue2 > Dictionary1['Current Version'] {
menu {
item "Download Update":
const URL = url(Text8['URL'])
openURL(URL)
item "Not now":
}
}
}
}
Descompilado con cherri 2.3.0 (GPL-2.0). Puede que necesite pequeños ajustes antes de compilarse.
Valoraciones y reseñas
Escribe una reseña–
de 5
★★★★★
★★★★
★★★
★★
★
0 ratings
Aún no hay reseñas. ¡Sé el primero en compartir tu opinión!
Publicidad
Más de furkan2427
También te puede gustar
Publicidad