# データベースからカスタマイズされたテキストをYMLにエクスポート

**URL:** <https://meta.discourse.org/t/export-customized-text-from-database-into-yml/53760>\
**Category:** Translations\
**Created:** [2016 年 12 月 4 日午前 3:07 UTC](https://meta.discourse.org/t/export-customized-text-from-database-into-yml/53760 "2016-12-04T03:07:07Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![mqmenchaca](https://avatars.discourse-cdn.com/v4/letter/m/90ced4/32.png) [@mqmenchaca](https://meta.discourse.org/u/mqmenchaca)\
**Post date:** [2022 年 10 月 5 日午後 8:41 UTC](https://meta.discourse.org/t/export-customized-text-from-database-into-yml/53760/6 "2022-10-05T20:41:35Z")

</div>

私もこのことについて考えており、PRを作成しました。

> <https://github.com/discourse/discourse/pull/18489>
>
> This commit creates a rake task to export a yml file of overridden client/server… translations. In order to do this, I've created a second accessible function in the LocaleFileChecker, load\_default\_locale\_files, that will return the contents of the server and client locale files located at config/locales/\*.XX.yml, where the locale XX is the default for the Discourse configuration.
> 
> We then loop through all values configured in that TranslationOverride table and use the defaults above to determine if the overridden value is from the client.yml file or the server.yml file. Values for the specified type are then output by the rake task created here.
> 
> To call the rake task, use
> 
> rake locale\_overrides: export\[client\]
> rake locale\_overrides: export\[server\]

---

_[View the full topic](https://meta.discourse.org/t/export-customized-text-from-database-into-yml/53760)._
