Jump to content

RunningBugs

Member
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

RunningBugs's Achievements

Helping Hand

Helping Hand (3/5)

0

Reputation

  1. Thank you so much! I solved the problem by normalizing the text to NFC! My program determine the source language using Asure's Translator API, there's detect API, translation API ( for sentences ) and Dictionary API.
  2. Dear all, I'm working on my own workflow which will translate any language to simplified Chinese using the Asure Translator API. I've created a rust client to do this, running it on command line looks like this: ``` $ ./translator dignité text:dignité from:fr to:zh-Hans {"items":[{"title":"尊严","subtitle":"fr","arg":"尊严"}]} ``` The text line and from line are printing to stderr, just for debugging purpose. Here we can see we successfully translate the word from french to simplified Chinese However, when I call this program in alfred workflow (script filter), the results is different. I'm attaching the debugging log here ``` [12:20:38.362] Translate[Script Filter] Queuing argument 'dignité' [12:20:38.998] Translate[Script Filter] Script with argv '(null)' finished [12:20:38.999] STDERR: Translate[Script Filter] text:dignité from:en to:zh-Hans [12:20:39.001] Translate[Script Filter] {"items":[{"title":"dignité","subtitle":"en","arg":"dignité"}]} [12:20:40.981] Translate[Script Filter] Processing complete [12:20:40.982] Translate[Script Filter] Passing output 'dignité' to Copy to Clipboard ``` Here, we can see the text line is correct, my program accept input parameter as dignité However, for this same input, it's recognizing as en rather than fr, and its result is not translating the word I tried this process many times. Every time I call the program using terminal, it shows the correct output, recognizing this French word and every time I called it through alfred, it shows the wrong results, not translating it. Anyone has any idea what's the possible reason? My script filter script is: ``` ./translator '{query}' ```
×
×
  • Create New...