Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indonesian Translation Tracking #369

Closed
58 tasks done
quadratz opened this issue May 19, 2022 · 47 comments · Fixed by #480
Closed
58 tasks done

Indonesian Translation Tracking #369

quadratz opened this issue May 19, 2022 · 47 comments · Fixed by #480
Labels
🇮🇩 ID Modifies or is related to the Indonesian translations.

Comments

@quadratz
Copy link
Contributor

quadratz commented May 19, 2022

🇮🇩 Indonesian

Deskripsi

Issue ini digunakan untuk memantau proses translasi semua halaman. Issue akan ditutup ketika semua dokumentasi berhasil diselesaikan.

Ikutan dong...!!!

Menjadi Penerjemah

  1. Sebelum memulai, pahami dulu panduan berkontribusi untuk penerjemah.
  2. Terjemahkan dengan bahasa yang kamu kuasai. JANGAN hanya copas alias copy-paste mentah-mentah dari google translate. Gunakan pemahaman kamu agar menghasilkan terjemahan yang baik dan enak dibaca.
  3. Ambil satu halaman yang belum diterjemahkan. Terus terjemahkan. Kalau sudah, buat pull request (PR) sesuai panduan di point satu di atas. Ingat, satu PR untuk satu halaman agar mudah dikerjakan dan dikoreksi.

Menjadi Penyunting

Silahkan dikoreksi PR translasi yang sudah dibuat. Tambahkan catatan jika diperlukan.

Catatan

Kata-kata yang berhubungan dengan methods, nama function, variables... tidak perlu diterjemahkan. Berikut beberapa contohnya:

bot
update
keyboard / inline keyboard
webhook
payload
... (dan lain-lain)

🇬🇧 English

Description

This issue is for tracking the translation progress of all pages and will be closed when the documentation is finished.

I want to collaborate too!

Being a translator

  1. Read how to contribute in translations
  2. Translate with your native-speaker level, DO NOT just copy the section to some translator tool and paste back the result
  3. Take one untranslated page, translate and create PR from your fork to the main project. One PR for page, to better split in parallel the work and less tired reviews

Being a reviewer

Find the PR's created for translations and review them. Add all notes that you consider.

Note

Words related to methods, function names, variables... mustn't be translated. Here are some examples:

bot
update
keyboard / inline keyboard
webhook
payload
... (feel free to add more, but make sense)

📝 Translation progress

README

Advanced

Demo

Guide

Hosting

Plugins

Resources

Config

@KnorpelSenf
Copy link
Member

@CikiMomogi so cool to see you're attempting to translate the website to Indonesian! This is a huge effort that should not be underestimated. I hope you are familiar with the translation guide :)

We are going to follow your progress closely so we can be sure that the translations are of high quality. Could you tell us the names of all contributors known so far who are going to help you translate this page to Indonesian? A rough estimate is that the translation will take 250-400 work hours, so even if you spent 50 hours per week, it will take more than one month. This is based on how much time the last teams needed.

Having someone to review and reiterate is very important because clear language should always be validated by another person to be truly understandable.

@quadratz
Copy link
Contributor Author

@CikiMomogi so cool to see you're attempting to translate the website to Indonesian! This is a huge effort that should not be underestimated. I hope you are familiar with the translation guide :)

Thanks for the kind words. I've read translation guide and understand that this is a long time-consuming project, should be fully completed, and has potential to be abandoned. I will do my best to complete this project.

For the translation quality, I have some experience translating various applications (you can check my crowdin @CikiMomogi). I always choose the word that are easier to understand and not too technical for my fellow Indonesian out there without compromising the meaning of the sentence itself. Not just copy-paste from the translator.

For now I do not have a list of other contributors. Of course, I look forward to readers who are fluent in Indonesian to contribute as well.

@rojvv
Copy link
Member

rojvv commented May 19, 2022

Hi there @CikiMomogi!


We want to keep the current quality of our documentation, we want our upcoming translations in other languages to be simple, clear, and easily understandable by the speakers of the respective language.

To ensure and enforce a high-quality translation, we need each page to be reviewed individually after it has been translated.
To do that, you will have to open a pull request for each page that you translate.
All of those pull requests should be reviewed.
We recommend the reviews are done by someone else than the one who translated the page, but this can be done by the one who translated if there was no chance to have someone else.


Here are some suggestions for your translation process:

  • To make your translations always stay up-to-date, subscribe to pull request notifications on this repository (Watch > Custom > Pull requests > Apply), and watch out for pull requests that might get the "ready for translation" label. Once they have this label, you can sync your translations with the changes that the pull request suggests. This is only if you have previously translated the page that the pull request is meant for.
  • Always keep a browser window open for previewing the pages while you translate them. See how you can run the website locally.
  • Format the files often.
  • While translating the pages, keep mind that you should not leave the anchor links (for example #indonesian-language) as they are. They should be replaced with the translated section name (for example if the translated section name is "Bahasa Indonesia", it should be replaced with "#bahasa-indonesia").

Feel free to ask me questions or to tell me if a point needs more clarification. Thank you for your efforts!

@quadratz
Copy link
Contributor Author

After I merged #375 into my main branch, I got an error when running npm run docs:dev. Can anyone help me? Here is the error log:

> grammy-website@1.0.0 docs:dev
> vuepress-vite dev docs
​
Error: Cannot find module './index.json'
Require stack:
- /home/qz/development/grammY/web/website/site/docs/.vuepress/plugins/current-versions/plugin.ts
- /home/qz/development/grammY/web/website/site/docs/.vuepress/config.ts
- /home/qz/development/grammY/web/website/site/node_modules/@vuepress/cli/lib/config/loadUserConfigCjs.js
- /home/qz/development/grammY/web/website/site/node_modules/@vuepress/cli/lib/config/loadUserConfig.js
- /home/qz/development/grammY/web/website/site/node_modules/@vuepress/cli/lib/config/index.js
- /home/qz/development/grammY/web/website/site/node_modules/@vuepress/cli/lib/commands/build/createBuild.js
- /home/qz/development/grammY/web/website/site/node_modules/@vuepress/cli/lib/commands/build/index.js
- /home/qz/development/grammY/web/website/site/node_modules/@vuepress/cli/lib/commands/index.js
- /home/qz/development/grammY/web/website/site/node_modules/@vuepress/cli/lib/index.js
- /home/qz/development/grammY/web/website/site/node_modules/vuepress-vite/bin/vuepress.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/qz/development/grammY/web/website/site/docs/.vuepress/plugins/current-versions/plugin.ts:26:28)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.require.extensions..ts (/home/qz/development/grammY/web/website/site/node_modules/@vuepress/cli/lib/utils/allowTs.js:11:11)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)

@KnorpelSenf
Copy link
Member

You need to run npm install one more time.

This will make sure that npm run docs:index-versions is executed, a script that generates a local index or all most recent plugin versions. (So you could also just run the latter script manually.)

@quadratz
Copy link
Contributor Author

The error was resolved after I ran npm run docs:index-versions. Thanks for the help.

@quadratz
Copy link
Contributor Author

Regarding point 1 of the following page,

  1. We must have access to the bot object. This means that we have to pass the bot object all around our code base in order to respond, which is annoying when you have more than one source file and you define your listener somewhere else.

I understand that we can use ctx.api instead of bot.api. That way, we no longer need to pass the bot object around the code base, right? But I don't quite understand the use case. Can you give an example or source code of comparison between the two?

@KnorpelSenf
Copy link
Member

KnorpelSenf commented May 23, 2022

The train of thought is:

Need to use bot.api for every API call
→ need access to bot everywhere
→ need to import it into every module
→ results in high cohesion of the source
→ prevents us from decoupling our components
→ bad software architecture.

So the solution is to use ctx.api because the ctx is declared locally in every module, so you can decouple your code and have a good architecture.

That's simplified, but you get the idea.

@quadratz
Copy link
Contributor Author

After I read some source code examples, now I completely understood. Previously, I had confused ctx.api with composer to replace the bot object. :P

@quadratz
Copy link
Contributor Author

quadratz commented May 28, 2022

@sensen:
I am going to return the translation for some technical words to their origin, e.g:
kueri inline => inline query,
penggerak grammY => grammy runner,
pembaruan => update (update object),
komposer => composer
permintaan => request (HTTP request)
batasan error => error boundary
penyimak => listener
pustaka => library
etc.

However, commonly used phrases will remain:
composer class => kelas composer
function x => fungsi x,
etc.

I'm pretty sure the readers have learned programming before, therefore they should be familiar with these words. Moreover, the words when translated sound a little weird - at least for me. I want to hear your thoughts on whether this is a good idea.

Here is the sample: https://github.com/CikiMomogi/website/pull/20

@sensen
Copy link

sensen commented May 28, 2022

Hey @CikiMomogi!

I agree. It sounds weird to me, too. Possibly because we're very familiar with the English words.

I can't remember the last timeI read documentation in Indonesian language. But if I were to do that, I'd prefer the documentation to keep the technical terms in English.

If you decided to go with this, I'd suggest not translating even composer class or function x.

@quadratz
Copy link
Contributor Author

quadratz commented Jun 1, 2022

Can I change the link reference from Deno

If you want to, you can even [make an API call when responding to the Telegram request](#webhook-reply), even though this has [a number of drawbacks](https://doc.deno.land/https://deno.land/x/grammy/mod.ts/~/ApiClientOptions#canUseWebhookReply).

to here?

Since the content is the same, I think it would be better to redirect readers to the translated doc instead. 

@KnorpelSenf
Copy link
Member

Can I change the link reference from Deno

If you want to, you can even [make an API call when responding to the Telegram request](#webhook-reply), even though this has [a number of drawbacks](https://doc.deno.land/https://deno.land/x/grammy/mod.ts/~/ApiClientOptions#canUseWebhookReply).

to here?

Since the content is the same, I think it would be better to redirect readers to the translated doc instead.

There are two links in the line of text you reference, and one of them already refers to

if I'm not mistaken.

@quadratz
Copy link
Contributor Author

quadratz commented Jun 1, 2022

There are two links in the line of text you reference

The second one. https://doc.deno.land/https://deno.land/x/grammy/mod.ts/~/ApiClientOptions#canUseWebhookReply

@KnorpelSenf
Copy link
Member

KnorpelSenf commented Jun 1, 2022

Yes, so you want to have identical two links in the same sentence?

@quadratz
Copy link
Contributor Author

quadratz commented Jun 1, 2022

Well, I can rearrange the words to reference the single link. But, I wonder if you did them intentionally, except for avoiding the two identical link in the same sentence.

@KnorpelSenf
Copy link
Member

KnorpelSenf commented Jun 1, 2022

The API reference is always more comprehensive and more accurate than the website because it is directly generated from the code, but the website is more high-level and easier to understand. In cases where it really matters, such as here where messages could potentially get lost, it is often good advice to check out the API reference in addition. That's why I would like to keep both links.

However, I do see the point that the content behind the two links is redundant now. This happened because the docs used not to go into depth here, which was a bit of a pitfall, so we decided to make the drawbacks more prominent.

I have opened #418 which fixes the problem. Can you check it out and say if that phrasing is better?

@quadratz
Copy link
Contributor Author

quadratz commented Jun 1, 2022

I have opened #418 which fixes the problem. Can you check it out and say if that phrasing is better?

Yep, looks good to me!

@quadratz
Copy link
Contributor Author

quadratz commented Jun 5, 2022

Is Node in the comment bellow referring to node.js? If so, does that mean there is a typo in the code snippet for Deno? (full context)

const { Bot } = require("grammy");

const bot = new Bot("<token>");

// Stopping the bot when Node process
// is about to be terminated
process.once("SIGINT", () => bot.stop());
process.once("SIGTERM", () => bot.stop());

await bot.start();

Deno:

import { Bot } from "https://deno.land/x/grammy@v1.8.3/mod.ts";

const bot = new Bot("<token>");

// Stopping the bot when Node process
// is about to be terminated
Deno.addSignalListener("SIGINT", () => bot.stop());
Deno.addSignalListener("SIGTERM", () => bot.stop());

await bot.start();

Also, I don't understand the meaning of both registered and trademark symbols in the last paragraph That’s basically all there is to reliability, your instance should®️ never™️ crash now. I'm sure it is supposed to be a joke, but I missed the punchline. 😅

@rojvv
Copy link
Member

rojvv commented Jun 5, 2022

Thank you for the report, @CikiMomogi!

I've opened #421 related to that, can you please do me a review?

@quadratz
Copy link
Contributor Author

Don't we need to import somePluginMethod from some-plugin because we invoke bot.api.somePluginMethod() on line 109?

```ts
import { Api, Bot, Context } from "grammy";
import { SomeApiFlavor, someContextFlavor, somePlugin } from "some-plugin";
// Context flavoring
type MyContext = Context & SomeContextFlavor;
// API flavoring
type MyApi = Api & SomeApiFlavor;
// Use both flavors.
const bot = new Bot<MyContext, MyApi>("my-token");
// Use a plugin.
bot.api.config.use(somePlugin());
// Now call `bot.api` with adjusted types from API flavor.
bot.api.somePluginMethod();
// Also, use adjusted context type from context flavor.
bot.on("message", (ctx) => ctx.api.somePluginMethod());
```

@rojvv
Copy link
Member

rojvv commented Jun 14, 2022

No, somePluginMethod is a method that will be added to bot.api’s prototype after the plugin is installed in line 106.

@quadratz
Copy link
Contributor Author

Can somebody please check my PQ? The github actions keep failing. However, when I ran deno fmt --check, there was no such error. Somehow the formatting error was found in another file that I haven't touched at all.

@KnorpelSenf
Copy link
Member

This is because of the recent Deno 1.23.0 update. Look how denoland/deno#14841 was merged and now affects existing files in all future CI runs. Feel free to fix it, even though that means you'll touch unrelated files.

@roj1512 it would be great if you could push a formatting commit upstream.

@quadratz
Copy link
Contributor Author

Oh, so that's the reason. I guess it's perfect time to upgrade my Deno.

@rojvv
Copy link
Member

rojvv commented Jun 16, 2022

@KnorpelSenf I don't have access to his fork.

@KnorpelSenf
Copy link
Member

You mean you do not have write access?

@rojvv
Copy link
Member

rojvv commented Jun 16, 2022

ye

@KnorpelSenf
Copy link
Member

I guess that's the disadvantage of doing translations in forks.

Do you need write access for anything, i.e. is there anything you can't do via forking? Should I ask @CikiMomogi to give you write access? 😄

@rojvv
Copy link
Member

rojvv commented Jun 16, 2022

Of course I can make a PR to reformat. I thought you mean I just push to his upstream

@KnorpelSenf
Copy link
Member

Ah I see, sorry, I meant the main repo, but now I fixed it myself in #422

@KnorpelSenf
Copy link
Member

I should've maybe referred back to #369 (comment) from #422 🤔

@rojvv
Copy link
Member

rojvv commented Jun 16, 2022

Glad it's fixed anyway

@KnorpelSenf KnorpelSenf pinned this issue Jun 17, 2022
@quadratz
Copy link
Contributor Author

quadratz commented Jun 19, 2022

I'm a bit lost as to what creator means here. At line 318, my interpretation is that ctx.match will contain the name of the message sender, NOT the creator of the bot. So, the bot will reply "I was created by (message sender name)", correct?

Moreover, why even bother storing the payload if we can simply fetch the name of the message sender directly from ctx.from.first_name.

Here is an example menu that remembers its creator in the payload.
Other use cases could be, for example, to store the index in a paginated menu.
```ts
function generatePayload(ctx: Context) {
return ctx.from?.first_name ?? "";
}
const menu = new Menu("store-author-name-in-payload")
.text(
{ text: "I know my creator", payload: generatePayload },
(ctx) => ctx.reply(`I was created by ${ctx.match}!`),
);
bot.use(menu);
bot.command("menu", async (ctx) => {
await ctx.reply("I created a menu!", { reply_markup: menu });
});
```

@KnorpelSenf
Copy link
Member

Creator refers to the original author of the message, also across forwards. While we could clarify that, it's also a very primitive example to illustrate the feature without much code. Maybe we can find a real-world use case that is better suited as an example to explain this. Do you have any suggestions?

@quadratz
Copy link
Contributor Author

Page not found at the following link:

- Reference: <https://doc.deno.land/https://raw.githubusercontent.com%2Fgrammyjs%2Fauto-retry%2Fmain%2Fsrc%2Findex.ts>

Is it supposed to reference this link, https://raw.githubusercontent.com/grammyjs/auto-retry/main/src/index.ts?

@KnorpelSenf
Copy link
Member

https://doc.deno.land/https://raw.githubusercontent.com/grammyjs/auto-retry/main/src/index.ts is the correct link. Deno changed something in the way they represent their URLs, which broke this link. It used to work before.

@quadratz
Copy link
Contributor Author

Got it! I will make the PQ.

@quadratz
Copy link
Contributor Author

quadratz commented Jul 26, 2022

@KnorpelSenf @roj1512 Do you guys need a review approval for each pull request in my repository? Currently I have approval request enabled only for one collaborator.

@rojvv
Copy link
Member

rojvv commented Jul 26, 2022

@CikiMomogi nope, it's fine!

@quadratz
Copy link
Contributor Author

**grammY takes a step back and rethinks a type-safe bot framework with approachability first.**
This allowed to skip a lot of the frustrating discussions around how to cope with strange internal typings.
It enabled the project to have clean, consistent, compiling code that provides users with excellent types (=editor support).

What is (=editor support) at the end of line 43? Does it have a specific meaning or is it just a typo?

@KnorpelSenf
Copy link
Member

Types give information about the code to the editor. That's why providing types improves how well your editor can support you. Types equals editor support.

@quadratz
Copy link
Contributor Author

quadratz commented Jul 28, 2022

Is the editor here referring to the code editor? Therefore, by providing types, it can bring more information to the code editor and thus improve productivity and make it easier for users.

@KnorpelSenf
Copy link
Member

Yes, the TypeScript types improve what VSCode can do for you. We describe this in more depth a few paragraphs later.

@quadratz
Copy link
Contributor Author

quadratz commented Aug 2, 2022

https://github.com/orgs/CikiMomogi-grammY/teams/translator/discussions/3/comments/8

CSS untuk dokumentasinya, memang dibuat pakai text-justify: inter-character ya? kadang agak ngerasain pada bagian tertentu paragrafnya jadi kayak A B C D.

Normal spacing:

Too wide (?):

"Does the CSS intentionally use text-justify: inter-character? The spacing in some paragraphs looks too wide if the words are too long". Is it possible for us to fix the issue?

@KnorpelSenf
Copy link
Member

Yes, all styles are here:

text-justify: inter-character;

Feel free to play around with the config. For example, it looks like your browser isn't able to hyphenate Indonesian. This issue does not appear in English.

@KnorpelSenf KnorpelSenf added the 🇮🇩 ID Modifies or is related to the Indonesian translations. label Sep 5, 2022
@rojvv rojvv closed this as completed in #480 Sep 5, 2022
@KnorpelSenf KnorpelSenf unpinned this issue Sep 5, 2022
@quadratz
Copy link
Contributor Author

quadratz commented Sep 5, 2022

SELESAI..!!! 🥳 Terima kasih yang sebanyak-banyaknya untuk @fadzikri dan @sensen atas masukan, saran dan bantuan perbaikan terjemahannya selama 3 bulan lebih ini. Not to mention @KnorpelSenf and @roj1512 for their guidance and patience to answer my noob questions 😅.

npm run deploy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🇮🇩 ID Modifies or is related to the Indonesian translations.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants