File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ async def __translate(self, script: str) -> str:
168168 )
169169
170170 await page .fill (
171- "div[aria-labelledby=translation -source-heading ]" ,
171+ "[data-testid=translator -source-input] div[role=textbox ]" ,
172172 script ,
173173 )
174174
@@ -213,13 +213,8 @@ async def __translate(self, script: str) -> str:
213213 msg = "Unable to get translated text"
214214 raise DeepLCLIPageLoadError (msg ) from e
215215
216- input_textbox = page .get_by_role ("region" , name = "Source text" ).locator (
217- "d-textarea" ,
218- )
219- output_textbox = page .get_by_role (
220- "region" ,
221- name = "Translation results" ,
222- ).locator ("d-textarea" )
216+ input_textbox = page .locator ("[data-testid=translator-source-input]" )
217+ output_textbox = page .locator ("[data-testid=translator-target-input]" )
223218
224219 self .translated_fr_lang = str (
225220 await input_textbox .get_attribute ("lang" ),
Original file line number Diff line number Diff line change 119119}
120120
121121TO_LANGS : Final [set [str ]] = FR_LANGS | {
122- "en-gb" ,
123- "en-us" ,
122+ "de-CH" ,
123+ "en-GB" ,
124+ "en-US" ,
124125 "es-419" ,
125- "pt-br" ,
126- "pt-pt" ,
127- "zh-hans" ,
128- "zh-hant" ,
126+ "fr-CA" ,
127+ "pt-BR" ,
128+ "pt-PT" ,
129+ "zh-Hans" ,
130+ "zh-Hant" ,
129131} - {
130132 "auto" ,
131133 "en" ,
You can’t perform that action at this time.
0 commit comments