[READ-ONLY] Mirror of https://github.com/shuuji3/weblog. 🌎 Weblog Articles powered by Hugo weblog.shuuji3.xyz
0

Configure Feed

Select the types of activity you want to include in your feed.

feat: 2023-09-13-psycopg3-documentation-japanese-translation-update.md

+58 -1
+57
content/post/2023-09-13-psycopg3-documentation-japanese-translation-update.md
··· 1 + --- 2 + title: Translating psycopg3 documentation 3 + date: 2025-01-06 4 + tags: 5 + - psycopg3 6 + - translation 7 + toc: true 8 + --- 9 + 10 + > This post was actually written on March 25, 2023, but completely forgot to publish. During that period, I wrote [Takahē articles](post/2024-03-13-takahe-gihyo-article) and translated psycopg3 documentation into Japanese at the same time. 11 + 12 + I continue [translating psycopg3 into Japanese](https://psycopg3-ja.translation.shuuji3.xyz/) one by one. It's fun to learn unknown PostgreSQL features and how psycopg3 is handling connections and queries under the hood for database libraries in Python! 13 + 14 + <!--more--> 15 + 16 + ## ReStructuredText syntax 17 + 18 + By translating documentation written in ReStructuredText syntax, I become much familiar with this syntax and finally come to get confident with them. Surely I read in a lot of various Python documentations and translated huge amount of Django translation text on Transifex. But somehow I couldn't fully understand a few syntaxes. 19 + 20 + That lack of confidence has almost disappeared and I can see the power and flexibility of this syntax now. 21 + 22 + ## Contributing to `sphinx-socialgraph` 23 + 24 + I noticed that psycopg documentation doesn't have any OpenGraph Protocol meta data in `<head />`. And after a quick search, I found `sphinx-socialgraph` just for this addition. 25 + 26 + Unfortunately, its generated card image only support default embedded Roboto Flex font file at that time, so any CJK language characters cannot be rendered other than many Tofu ⬜⬜⬜ ! 27 + 28 + There was an existing issue too: [Bundled Roboto font does not support Japanese (social images) · Issue #108 · wpilibsuite/sphinxext-opengraph](https://github.com/wpilibsuite/sphinxext-opengraph/issues/108) 29 + 30 + As the issue explains, the card image is rendered with `matplotlib` but its custom font loading feature was still "TODO" state. As I had some experience with `matplotlib` for a while ago, I somehow could solve the problem to allow the library to load any detectable font file from `matplotlib`. 31 + 32 + [The PR is waiting for the review](https://github.com/wpilibsuite/sphinxext-opengraph/pull/110) and hopefully to be merged soon. (later merged on Oct 28, 2023 🎉) 33 + 34 + **Before** 35 + 36 + ![image](https://user-images.githubusercontent.com/1425259/266687384-776f1477-86e5-45f3-acd6-07e39a984092.png) 37 + 38 + **After** 39 + 40 + ![image](https://user-images.githubusercontent.com/1425259/266687274-edb4fae4-5204-4090-81e4-cd0712823654.png) 41 + 42 + ## Translation rules 43 + 44 + While translating docs, I built up the following rules to be consistent: 45 + 46 + - place spaces between Japanese and ASCII characters. 47 + - put a space in between multiple Katakana words 48 + - But "server-side" and "client-side" are concatenated with "-" and they should be treated as one word, so they are translated to "サーバーサイド" and "クライアントサイド" accordingly (not "サーバー サイド") 49 + - behave = 動作する (not 振る舞う) 50 + - I felt this may help map one word and concept in mind more connected due to the higher density of Kanji characters. 51 + - advanced = 発展的な 52 + - open/close = オープン/クローズ (I though 開く/閉じる is acceptable but オープン is more natural like in the verb "オープンする" 53 + - connection = コネクション、コネクションする (not 接続 or 接続する) 54 + - both are understandable but the conversion cost of 接続 -> コネクション in brain has a bit more resistance. 55 + - statement = ステートメント, not 文 56 + - similarly, ステートメント can be mapped to statement more directly, and one might question like "Which 文 means here?" 57 + - use = 使用 (not 利用)
+1 -1
content/post/2024-03-13-2024-03-13-takahe-gihyo-article.md content/post/2024-03-13-takahe-gihyo-article.md
··· 3 3 date: 2024-03-13T13:37:36Z 4 4 tags: ["media", "activitypub", "fediverse", "takahe", "elk", "writing"] 5 5 toc: true 6 + aliases: 2024-03-13-2024-03-13-takahe-gihyo-article # typo 6 7 --- 7 8 8 9 It was already a half year ago, but I had an opportunity to write two long articles about Takahē in Japanese on the website gihyo.jp, managed by Gijutsu-Hyoron Co., Ltd. (技術評論社), one of the famous technical book publishers in Japan: ··· 18 19 19 20 But it was a wonderful experience as I was able to introduce little-known Takahē and its interesting architecture at that time to the Japanese 20 21 tech community and learn/explore more about ActivityPub/Fediverse, Django, and many other communities in depth at the same time. 21 -