Mit dem iPhone scannen, um zu installieren
Translate 10 different languages! Still adding!
Neue Funktionen
Version 2.9
Less languages but more efficient! Only 3 languages now.
Was er macht
97 Aktionen-
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
-
Text
-
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
-
Split Text
-
Replace Text
-
Set VariableFavourites
-
Text
-
Split Text
-
Set VariableLanguages
-
Text
-
Split Text
-
Set VariableShort Names
-
Dictionary
-
Set VariableLanguage Dictionary
-
Repeat with Each
-
Get Item from List
-
Set Dictionary Value
-
Set VariableLanguage Dictionary
-
Count
-
If
-
Get Variable
-
If
-
Choose from List
-
If
-
Choose from List
-
Change Case
-
Get Dictionary Value
-
URL Encode
-
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 URL…
-
Number
-
Set VariableBreak Loop
-
Repeat with Each
-
If
-
Calculate
-
If
-
Add to Variable
-
If
-
If
-
Count
-
If
-
Number
-
Set VariableBreak Loop
-
Count
-
Calculate
-
Get Item from List
-
Combine Text
-
Set VariableTranslated Text
-
Get Variable
-
If
-
If
-
Text
-
Choose from Menu…
-
Choose from MenuShare...
-
Get Variable
-
Share
-
Choose from MenuCopy to Clipboard
-
Get Variable
-
Copy to Clipboard
-
Number
-
Set VariableUse UpdateKit
-
If
-
Get My Shortcuts
-
If
-
Dictionary
-
Run ShortcutUpdateKit
Als Code ansehen
Jede Aktion dieses Kurzbefehls als Cherri ausgeschrieben, eine Programmiersprache für Kurzbefehle. Ideal, um zu lernen, wie er funktioniert.
#include 'actions/web'
#include 'actions/text'
#include 'actions/sharing'
#define color violet
#define glyph globe
if ShortcutInput == ShortcutInput {
const Settings = getDictionary(ShortcutInput)
const Text = getValue(Settings, "Text")
const Anzahl = count(Text, "Characters")
if Anzahl > 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?\n\nCurrent Clipboard:\n{Clipboard}"
menu Text1 {
item "Clipboard":
getClipboard()
item "Enter text...":
prompt("Please enter text to translate")
}
}
const Favourites = "Dutch\nPolish\nEnglish"
// 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 Text2 = "English\nSpanish\nFrench"
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\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\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
@LanguageDictionary = {}
for _ in @Languages {
const ShortName = getListItem(@ShortNames, @RepeatIndex)
setValue(@LanguageDictionary, @RepeatItem, ShortName)
@LanguageDictionary
}
const Anzahl1 = count(@InputLanguage, "Characters")
if Anzahl1 > 0 {
// TODO: Get Variable not supported: Assign variable here to '@InputLanguage'.
} else {
const AusgewhltesObjekt = chooseFromList(@Favourites, "Please select language to translate to")
if AusgewhltesObjekt contains "Other..." {
chooseFromList(@Languages, "Please select language to translate to")
}
}
const Language1 = uppercase(Language)
const LanguageShortName = @LanguageDictionary[Language1]
const EncodedQuery = urlEncode(Input)
const Wrterbuch = {
"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": "{EncodedQuery}",
"sl": "auto",
"ssel": 0,
"tk": "000000.000000",
"tl": "{LanguageShortName}",
"tsel": 0
}
const Wrterbuchwert = getKeys(Wrterbuch)
for _ in Wrterbuchwert {
const Values = getValue(Wrterbuch, @RepeatItem)
const Anzahl2 = count(Values, "Items")
if Anzahl2 > 1 {
const Wrterbuchwert1 = getValue(Wrterbuch, @RepeatItem)
for _ in Wrterbuchwert1 {
}
} else {
}
}
joinText(Wiederholungsergebnisse, "&")
url("https://translate.google.com/translate_a/single?{}")
const ContentsOfURL = downloadURL()
@BreakLoop = 0
for _ in ContentsOfURL {
if @BreakLoop == "0" {
const ErgebnisDerBerechnung = @RepeatIndex … nil
if ErgebnisDerBerechnung == "1" {
@TranslatedParts = @RepeatItem
} else {
if ErgebnisDerBerechnung == "0" {
const Anzahl3 = count(@RepeatItem, "Characters")
if Anzahl3 > 1 {
@BreakLoop = 1
}
}
}
}
}
const Anzahl4 = count(@TranslatedParts, "Items")
const CalculationResult = Anzahl4 - 1
const ObjektAusListe = getListItems(@TranslatedParts, 0, CalculationResult)
joinText(ObjektAusListe)
@TranslatedText
// TODO: Get Variable not supported: Assign variable here to '@External'.
if @External == 0 {
} else {
const Text5 = "Translation results\n—————————\n{@TranslatedText}"
menu Text5 {
item "Share...":
// TODO: Get Variable not supported: Assign variable here to '@TranslatedText'.
share(@TranslatedText)
item "Copy to Clipboard":
// TODO: Get Variable not supported: Assign variable here to '@TranslatedText'.
setClipboard(@TranslatedText, "")
}
@UseUpdateKit = 1
}
if @UseUpdateKit == "1" {
const MeineKurzbefehle = getShortcuts()
if MeineKurzbefehle contains "UpdateKit" {
const Wrterbuch1 = {
"Current Version": "2.3",
"RoutineHub ID": 254,
"Shortcut Name": "Google Translate"
}
run("UpdateKit", Wrterbuch1)
}
}
In Cherri Playground öffnen
Mit cherri 2.3.0 (GPL-2.0) dekompiliert. Eventuell sind kleine Korrekturen nötig, bevor es kompiliert wird.
Bewertungen und Rezensionen
Rezension schreiben–
von 5
★★★★★
★★★★
★★★
★★
★
0 ratings
No reviews yet. Be the first to share what you think!
Werbung
Mehr von virtual_helper
Das gefällt dir vielleicht auch
Werbung