Closed cemalokten closed 9 months ago
@RamyAlshurafa
It appears there may be an issue with the API for translations being directly requested in the browser without the lng
query. To address this, we could potentially add some default parameters to the translateText
function:
const translateText = async ({
text = '',
sourceLang = 'en',
targetLang = 'en',
}) => {
if (!targetLang || !sourceLang) {
throw new Error('The source or target language is missing');
}
const params = {
SourceLanguageCode: sourceLang,
TargetLanguageCode: targetLang,
Text: text,
};
However, this may not be a significant issue, since all requests from the user interface provide a language.
Let me know what you think.
Yeah thanks @cemalokten for that, i have added the lng = 'en'
to all controllers.
@RamyAlshurafa @cemalokten does that mean we can close this issue?
Further info![image](https://github.com/yalla-coop/cost-of-living-support/assets/60609268/fc8a11a7-2768-4a1d-9187-d7ff9189c21c)
Sentry link (may have expired): https://hyde-housing.sentry.io/issues/4570398547/?project=4504276397981696&query=is%3Aunresolved&referrer=issue-stream&statsPeriod=30d&stream_index=1