Skip to content

Conversation

@ArduanovDanil
Copy link
Contributor

No description provided.

@vjik vjik requested a review from a team September 4, 2025 19:02
@vjik vjik added the status:code review The pull request needs review. label Sep 4, 2025
@samdark samdark merged commit 2921bad into yiisoft:master Sep 4, 2025
2 of 3 checks passed
@samdark
Copy link
Member

samdark commented Sep 4, 2025

Thank you!

@rob006
Copy link

rob006 commented Sep 5, 2025

Is it possible to have a more practical directory structure? From translator POV it is more practical to have all translated files for single language in one directory. Something like:

en/
    caching_data.md.pot
    caching_overview.md.pot
    ...
ru/
    caching_data.md.po
    caching_overview.md.po
    ...

@ArduanovDanil
Copy link
Contributor Author

ArduanovDanil commented Sep 5, 2025

Hi, @rob006! Is it really need? :) When we did translating with .po files we didn't think about convenience in directories :) What about this structure?
image
Directory pot for .pot files and {lang} for .po files? You can see it this repository https://github.com/ArduanovDanil/docs/tree/po4a-files-in-one-dir/cookbook/po

@rob006
Copy link

rob006 commented Sep 5, 2025

What about this structure?

Looks good for me. 👍

Although I wouldn't use po as directory name - it looks like a another language code (and while po is not used right now as a valid language code, it could be used in the future). I would go with something like _translations - that would make clear distinct and put this directory at the top, so it would separate it from MD files.

@rob006
Copy link

rob006 commented Sep 5, 2025

I would remove redundant language codes from file names:
cookbook/po/ru/README.md.ru.po
->
cookbook/po/ru/README.md.po

@ArduanovDanil
Copy link
Contributor Author

@rob006
Copy link

rob006 commented Sep 8, 2025

I would go with:

_translations/
   cookbook/
      pot/
         README.md.pot
         ...
      po/
         ru/
            README.md.po
            ...
         pl/
            README.md.po
            ...

That should be quite easy to integrate this with external tools like Weblate (which IMO should be a next step).

Alternatively I would remove po and pot directories completely:

_translations/
   cookbook/
      README.md.pot
      ...
      ru/
         README.md.po
         ...
      pl/
         README.md.po
         ...

@ArduanovDanil
Copy link
Contributor Author

Something like that
image

https://github.com/ArduanovDanil/docs/tree/69c25d1cad213f06645bd50e8a60b94d4c00793e/_translations/cookbook

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:code review The pull request needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants