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

How to gen the other lang files ? #12

Open
gedw99 opened this issue Mar 1, 2025 · 1 comment
Open

How to gen the other lang files ? #12

gedw99 opened this issue Mar 1, 2025 · 1 comment

Comments

@gedw99
Copy link

gedw99 commented Mar 1, 2025

I am working on making this work with https://github.com/hajimehoshi/guigui and https://github.com/starfederation/datastar

For now just getting it working with https://github.com/Tom5521/fsize

I can gen a en.pot from go code, but how to gen the other languages scaffold ?

I call my targets POGO - PO and GO :)

my make file is like this:

# step 1: Extract text from go to EN pot.

pogo-run-extract: pogo-run-dep
	cd $(POGO_RUN_GO_SRC_PATH) && $(POGO_RUN_CMD) -o $(POGO_RUN_PO_SRC_EN_PATH)/messages.pot *.go

# step 2: Gen other lang pot file scaffold from EN Pot

pogo-run-gen: pogo-run-dep
	# ???
	cd $(POGO_RUN_GO_SRC_PATH) && $(POGO_RUN_CMD) -h

# step 3: Merge changes in EN to other lang pot files

pogo-run-merge-h: pogo-run-dep
	cd $(POGO_RUN_GO_SRC_PATH) && $(POGO_RUN_MERGE_CMD) -h

Would make sense to add text data folder maybe too ? I use the stat project now as a reference.

@gedw99 gedw99 changed the title How to gen the other lang files How to gen the other lang files ? Mar 1, 2025
@Tom5521
Copy link
Owner

Tom5521 commented Mar 1, 2025

What do you mean by “other lang files”?

My project is intended to be a clone of the original xgettext, and I am only trying to replicate its functionality

I can gen a en.pot from go code, but how to gen the other languages scaffold ?

The ideal would be to use msginit to create the po file of another language, and then apply msgmerge with the template and the created file.

But since all that is not finished yet, there is still no way to “get” those other files.

What you can do in the meantime is to run xgotext --lang=my-lang -o ./my-path/my-lang/default.po . but it only serves to generate the template

Please note that I am referring to the formatting of all the code that is still in beta, I have not yet released the v2.0.0 version that still has many changes ahead, mainly in the API

I call my targets POGO - PO and GO :)

Speaking of that, I think I should rename the project, what it is now is far away from its original concept and the name doesn't fit anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants