# Amazon translateの上限を〜10,000文字に引き上げる

**URL:** <https://meta.discourse.org/t/increase-amazon-translate-limit-to-10-000-characters/304579>\
**Category:** Feature\
**Tags:** translator, completed\
**Created:** [2024 年 4 月 18 日午後 9:41 UTC](https://meta.discourse.org/t/increase-amazon-translate-limit-to-10-000-characters/304579 "2024-04-18T21:41:40Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)\
**Post date:** [2024 年 4 月 19 日午前 9:54 UTC](https://meta.discourse.org/t/increase-amazon-translate-limit-to-10-000-characters/304579/5 "2024-04-19T09:54:44Z")

</div>

@alanbchristieさん、ありがとうございます。これがマージされれば修正されます 👍

> <https://github.com/discourse/discourse-translator/pull/137>
>
> The Amazon translate API allows for a text to be up to 10k bytes.
> 
> This change…s the \`MAXLENGTH\` constant into the \`MAX\_BYTES\` and uses a \`truncate\` method that works at the bytes level instead of the character/grapheme level.
> 
> Ref - https://meta.discourse.org/t/increase-amazon-translate-limit-to-10-000-characters/304579

ついでに、APIは10k文字ではなく最大10kバイトを期待するため、`truncate`メソッドを文字単位ではなくバイト単位で動作するように修正しました。

---

_[View the full topic](https://meta.discourse.org/t/increase-amazon-translate-limit-to-10-000-characters/304579)._
