ShareShortcuts

YES DAKOTA TRANSLATE(google Edition)

Translate 10 different languages!

virtual_helper
Dupliquer « YES DAKOTA TRANSLATE(google Edition) »

Tu as créé quelque chose de nouveau à partir de ce raccourci ? Partage-le comme version dérivée : il devient un raccourci à toi, que tu gères, et les deux pages renvoient l’une vers l’autre pour que virtual_helper soit crédité.

  1. 1Obtenez le raccourci et modifiez-le dans l’app Raccourcis. Donnez-lui un nom bien à lui.
  2. 2Partage-le depuis l’app Raccourcis et copie le lien iCloud.
  3. 3Reviens ici, colle le lien et décris ce qui change, par exemple : « Ajout d’une étape qui utilise Apple Intelligence pour personnaliser le texte. »
Créer mon fork
Téléchargements
44K
Enregistré
1
Actions
97
Catégorie
Calculations
Version
2.9
Langue
EN

Translate 10 different languages! Still adding!

Nouveautés

Version 2.9

Less languages but more efficient! Only 3 languages now.

Historique des versions
2.9 21 janv. 2022

Less languages but more efficient! Only 3 languages now.

1.0 20 janv. 2022

First release

Ce qu’il fait

97 actions
  1. If
  2. Get Dictionary from Input
  3. Get Dictionary Value
  4. Count
  5. If
  6. Number
  7. Set Variable
    External
  8. Set Variable
    Input Language
  9. Set Variable
    Use UpdateKit
  10. Get Variable
  11. If
  12. Get Variable
  13. If
  14. Text
  15. Choose from Menu
    …
  16. Choose from Menu
    Clipboard
  17. Get Clipboard
  18. Choose from Menu
    Enter text...
  19. Ask for Input
    Please enter text to translate
  20. Text
  21. Comment
    This is a list of favourites, please be sure to enter the favourites the same way they are found in the 'Languages' list below!
  22. Text
  23. Split Text
  24. Replace Text
  25. Set Variable
    Favourites
  26. Text
  27. Split Text
  28. Set Variable
    Languages
  29. Text
  30. Split Text
  31. Set Variable
    Short Names
  32. Dictionary
  33. Set Variable
    Language Dictionary
  34. Repeat with Each
  35. Get Item from List
  36. Set Dictionary Value
  37. Set Variable
    Language Dictionary
  38. Count
  39. If
  40. Get Variable
  41. If
  42. Choose from List
  43. If
  44. Choose from List
  45. Change Case
  46. Get Dictionary Value
  47. URL Encode
  48. Dictionary
  49. Get Dictionary Value
  50. Repeat with Each
  51. Get Dictionary Value
  52. Count
  53. If
  54. Get Dictionary Value
  55. Repeat with Each
  56. Text
  57. If
  58. Text
  59. Combine Text
  60. URL
    https://translate.google.com/translate_a/single?…
  61. Get Contents of URL
    …
  62. Number
  63. Set Variable
    Break Loop
  64. Repeat with Each
  65. If
  66. Calculate
  67. If
  68. Add to Variable
  69. If
  70. If
  71. Count
  72. If
  73. Number
  74. Set Variable
    Break Loop
  75. Count
  76. Calculate
  77. Get Item from List
  78. Combine Text
  79. Set Variable
    Translated Text
  80. Get Variable
  81. If
  82. If
  83. Text
  84. Choose from Menu
    …
  85. Choose from Menu
    Share...
  86. Get Variable
  87. Share
  88. Choose from Menu
    Copy to Clipboard
  89. Get Variable
  90. Copy to Clipboard
  91. Number
  92. Set Variable
    Use UpdateKit
  93. If
  94. Get My Shortcuts
  95. If
  96. Dictionary
  97. Run Shortcut
    UpdateKit

Afficher en tant que code
Bêta

Chaque action de ce raccourci écrite en Cherri, un langage de programmation pour Raccourcis. Idéal pour comprendre son fonctionnement.

#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 = getValue(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)
	}
}
Ouvrir dans Cherri Playground Décompilé avec cherri 2.3.0 (GPL-2.0). Quelques corrections peuvent être nécessaires avant la compilation.

Notes et avis

Écrire un avis
–
sur 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Aucun avis pour le moment. Sois le premier à partager ton avis !

Publicité

Plus de virtual_helper

Tout afficher

Ça pourrait aussi te plaire

Tout afficher
Publicité