Topic on User talk:Trizek (WMF)/Flow

Help with improving API docs

12
Martyav (talkcontribs)

Hi. I'm an intern with Outreachy/Round 17. I'm currently working closely with Srishti Sethi on the Developer Advocate team. My project is to update and improve the action API docs. Some of the pages I am tasked with have translation tags, which makes moving sections around to fit our template more complicated. Could you have a look at the drafts in my Sandbox to make sure the tags are correctly place and won't cause headaches for future editors? I have a list of my work in progress on my user page. Thanks! Martyav (talk) 15:20, 7 January 2019 (UTC)

Trizek (WMF) (talkcontribs)

Hey Martyav

Thank you for your message!

The translated pages are two types:

Literal translations are like taking a full page and translating it without any guide or structure. This is not what we use now.

From what I see, pages you're working on are using the literal system. Their translations are outdated since a while. It would be simpler to have those pages deleted and the pages you're creating properly marked for translations, using the actual system in use. There is a doc about preparing a page for translation.

Ask me if you block on something.

Martyav (talkcontribs)

Thank you. I'll talk to my mentor about it. That would certainly speed things up. However, I'm concerned this would remove the existing translations on the pages in the main namespace. The way we work, we take an existing page, create a draft based on it, then copy and paste the draft into the existing pages when it's ready. The tags on my drafts are based on the existing translation units on these pages. If we started over completely, we would lose the edit history and any translations already made to the page.

Trizek (WMF) (talkcontribs)

My suggestion to work from scratch is only for pages that are using the old translation format. That's the case for the pages you have in your sandbox, which was your initial question.

Pages using extension:translate should indeed be updated to keep existing translations alive. It is a bit trickier, but it saves time a lot for translators. Pages using that extension have been reviewed by some translation admins. They have changed some details and marked the pages for translations. Which means you are doing this well. :)

Martyav (talkcontribs)

Thanks for the response. While most of the articles listed on my userpage are as you described, the ones with 'WIP (translation)' contain tags that are based on the translation units from existing pages. It is indeed trickier to deal with these, and my mentor is concerned that they will introduce breaking changes if they are copy/pasted into the existing pages they are based on. For these pages, I need someone to review that the tags are correctly placed and will not cause problems.

SSethi (WMF) (talkcontribs)

Thanks, @Trizek (WMF), for your reply on this so far! :)

I want to chime in here and add a few more details and ask a couple of questions:

More specifically for API:Lists could you tell if this an example of literal translation or this is something done via Extension:Translate tool? What is the best way to identify that? Changes that we plan to integrate are still in @Martyav's Sandbox: User:Martyav/Sandbox/API:Lists. We tried to retain the translation tags in the new changes where feasible, but we ended up keeping very few because of quite a lot of re-organizing/re-wording content. Now, we are hesitant to push our changes to the main namespace because we feel that a lot of the work of translators might get lost in this process.

It might appear that User:Martyav/Sandbox/API:Lists and API:Lists are not different, but the attempt was to follow theAPI:Documentation_template and re-organize the content for better readability/ understanding on the topic.  

There will be similar more documentation examples like the API: Lists I shared above that Marty will be addressing shortly, and so understanding the approach we should take on this one might help us a lot going forward :)

Trizek (WMF) (talkcontribs)

@SSethi (WMF) API:Lists is using Extension translate. Pages using Extension translate have a "Translate this page" link on top and small colored squares close to each language.

User:Martyav/Sandbox/API:Lists has zero translation tags and markers. When I compare the two pages, I see that some content from the draft is really, really close to the wording of the old one. Things similar should be kept. The best practice is to preserve everything that can be preserved:

Draft:

Results for list queries always have a limit; the default limit is 10. The results limit can be set as high as 500 for regular users, or 5000 for users with the apihighlimits right (typically bots and sysops). Some modules impose stricter limits under certain conditions (more details).

Existing page:

<translate>

All list queries return a limited number of results.

This limit is 10 by default, and can be set as high as 500 for regular users, or 5000 for users with the <tvar|apihighlimits><code>apihighlimits</code></> right (typically bots and sysops).</translate>

Ideal compromise

Draft should then be the following, to preserve as many elements as we can:

<translate>

All list queries return a limited number of results.</translate> <translate>

This limit is 10 by default, and can be set as high as 500 for regular users, or 5000 for users with the <tvar|apihighlimits><code>apihighlimits</code></> right (typically bots and sysops).</translate>

<translate>

Some modules impose stricter limits under certain conditions (<tvar|conditions>[[Special:MyLanguage/API:Lists/All</>|more details]])

</translate>

We should have a meeting to discuss, it would make things easier.

Martyav (talkcontribs)
SSethi (WMF) (talkcontribs)

@Trizek (WMF) Thanks for taking a look! I am sorry I shared the wrong link in my reply to you. As @Martyav points out the correct link, could you take a look at it one more time and comment if the translation changes look up to the mark and convey that we have tried to preserve whatever we could :)

If there are major tweaks required, we would love to meet with you to discuss/ understand more on this topic.

Trizek (WMF) (talkcontribs)

I believe you when you say that you've preserved whatever you can. I've checked the page and fixed some details about the lists and added a tvar (on an existing item, but that's an improvement).

Translation are ready to be set. Using the translation markup is not really easy, and you've done a great job, @Martyav. Bravo!

To replace the existing page by your draft, copy the content of your draft where the page is and ask a translation admin to mark it for translation. But don't mark the draft for translation and then move it: it would break.

SSethi (WMF) (talkcontribs)
Martyav (talkcontribs)
Reply to "Help with improving API docs"