@tmoreira Haveyou done any progress in this? I am willing to help.
Thanks,
Rafael
Hi,
I have a question regarding Field Kit App translation, but though it was not worth a new thread. Is it done in the server size, with everything else? Or is there some strings in the client app that needs translation?
I am willing to help in translation to pt_Br. I think I can do it in a few days. I already took notice of the steps to use drupal translation module, and I am going to try. But if I could have access to the .po file, i could edit it in my text editor and send it back to be merged. @mstenta do you thing this is possible?
Thanks,
Rafael
Hi @rafaeltcc,
Unfortunately, Field Kit is a little more complicated. We have an issue open for it, but haven’t made much traction:
We’ve talked about the possibility of hooking into the server-side translation services, but that could be difficult to set up, since the server is a Drupal application written in PHP, and Field Kit is a Vue app written in JavaScript. Slightly easier setup would be to use a Vue plugin, such as vue-l18n, which would be a better fit for a Vue, but those translations would have to be maintained separately from the server. They would also be tightly coupled to the application code, meaning substantial code rewrites and continual maintenance. Even after initial setup, that work wouldn’t be possible without at least minimal JS knowledge.
Also, as mentioned in the GitHub issue, we’re in the process of getting FK ready for 1.0.0 release, along with a new architecture, Field Modules. All this adds complexity, but it’s possible with that work out of the way we could develop some kind of more centralized system which could work with the Drupal translation module, since the Field Modules would be served from the server.
Translations are definitely a priority, but being in the beta phase with Field Kit, we’re still working on a lot of the basic functionality, so there are a lot of competing priorities too. It’s just a matter of time though. I really hope we can take advantage of the many folks in the community who’ve offered to provide translations, when that time comes.
Best,
Jamie
HI @jgaehring,
Thanks for your explanation. I don’t know a lot about Drupal, the little experience I have, including in translating addons is with Plone.
I am going to be until the until December living in a fam and I wan’t to implement farmOs here and thus contribute somehow with the project and involve myself with the community.
The Field Kit is very interesting for us, the possibility of logging an event with geolocation coordinates would help a lot. But, translation to portuguese is an obligatory requisite.
As I have a deadline, I even thought about forking the app and hardcoding my translation as an workaround. I don’t know if this would be a transitory possibility, a cloned translated app … What do you think?
Anyway, as soon as you decide wich way to go (vue plugin, or server side i18n), I am ready to help with translation to portuguese and maybe help developing. I don’t have experience with PHP, but I know a little Python. I think I could handle task such as creating tags for i18n in strings in code.
Regarding the FarmOs translation to portuguese in general, I am still waiting some signal of life from @tmoreira and @sonwander to see if they have advanced in this translation, and have anything to share, otherwise I will start translating the .po file from localize.drupal.org.
Thanks,
Rafael
Hello, Rafael! Email me: sonwander@yahoo.com.br
Or send me a message via WhatsApp 5531975631347
@rafaeltcc, if you’re interested in forking Field Kit and translating it within the codebase, perhaps it would make sense to create a i18n branch that uses the Vue plugin to get started. That might have the best chance of being reintegrated into the app down the road, and would help more folks who might be interested in using your Portuguese translation or providing their own translation in the future.
I’d be happy to help you get started by creating a branch in the official repo to get started. Just let me know if that sounds good to you.
Also cc’ing @walt in case this might be of some interest to him.
HI Jamie,
I think that I can do that following the documentation of vue plugin. I will also watch the farmos developing tutorial in video to get a broad view on the architecture and to take note of the editing tools used. Can you create this branch and give me permission?
Thanks,
Rafael
Great! I’ll whip up a branch with the beginnings for the i18n plugin tonight.
I assume you’re on GitHub? If you are, I think the best thing is for you to fork the farmOS-client
repository, along with that branch (once its ready), and then as you make progress, we can merge your fork back into the official repo from time to time. I also think it would be great if we document this process in a GitHub issue for that repository, as a sort of guide for others who want to contribute translations.
And are you referring to this tutorial on developing farmOS?
Just so you know, that will not be relevant to working in Field Kit, which is a separate codebase that merely connects to farmOS via API. It’s great stuff to dig into, as it gives you a sense of the overall architecture and how farmOS works, but probably won’t be of much help for providing Field Kit translations or working with the Vue plugin; that stuff will all be done in the Field Kit codebase.
I’m happy to do a walk-through of how Field Kit and Vue work. It’s all in JavaScript, but if you’ve had a some Python experience I think you should be able to pick up enough JS for what will be involved here. If you want to do that walk-through, just send me a direct message through the forum and we can coordinate a call.
Hi all, just catching up here… I will argue for leveraging Drupal’s translation system. I’m not sure if/how that might relate to Vue’s I18N plugin (eg: perhaps they can work together?) but we absolutely should avoid having to maintain two separate repositories of translations, IMO. The localize.drupal.org repository is designed to serve this need, and Drupal can already provide translations to JavaScript. I think it will just be a matter of thinking through the best way to link that into Field Kit. I posted a comment to the Field Kit translations issue here describing how Drupal translations in JavaScript work: https://github.com/farmOS/farmOS-client/issues/214#issuecomment-658740776
That said, there’s probably no harm in creating a fork @rafaeltcc for your purposes. We should just give thought to how we can get those translations into whatever final form they need to be. It’s a bit tricky, and I would probably suggest doing this in your fork and not in the official repository - at least until we have a better sense of the final solution we’re aiming for.
@jgaehring would it make sense for you to create an i18n branch in your fork, which @rafaeltcc can fork from and continue? That way we keep the official repo clean clean and we’re not implying that it’s an official branch.
That sounds good to me! I got caught up on other work so I’ve not been able to do this yet anyways. So yea, I’ll do it that way.
It seems very possible. I need to look over the Drupal docs to make sure I understand that, but I’ll follow up on GH on how I think it might happen.
Right, but for Field Kit to use them, it needs to be able to send them over the wire. Can Drupal/restws do that?
Yea this is the big challenge, specifically with regard to the way we are deploying Field Kit right now, as a separate app on https://farmOS.app and packaged into iOS/Android apps.
However, if we were serving Field Kit directly from farmOS (eg: https://myfarm.farmos.net/app) then this would be a LOT easier. We would then have the ability to call Drupal.t()
directly from Field Kit’s code.
I’ll add these ideas to the Field Kit issue too - better to focus the technical discussion/considerations over there, I agree.
To me too.
Sorry, @rafaeltcc, I got tied up in some other issues and am just looking at our options again now. It’s actually made think how best to embark on this project…
Right now we’re in the process of rolling out a few big releases and lots of stuff is getting merged and updated. I expect this all to settle down within a week or two, which would probably be the best time to start making changes to any of the markup, but I have some thoughts on some preliminary steps we can take in the mean time.
This discussion is going to get more technical and off-topic for this forum thread, so I’d like to take the conversation over to this GitHub issue, if you don’t mind: https://github.com/farmOS/farmOS-client/issues/214
@mstenta and I have already started a conversation there. If you have a moment, glance over that discussion and leave a comment. I’m posting some more comments there shortly, with a more detailed plan of action. Then we can figure out where to go from there.
I could also assist on the translation, if needed be. From Luanda, Angola
Thanks @ruirodrigues! So you’d be interested in helping with the Portuguese translation? Are you more interested in helping with farmOS itself, or the solution we’re working on in Field Kit?
I am available for all what concerns translation. I’m in the agriculture field and willingly to help where I find to be able. Whatever the solution is ok with me. My knowledge about software development is null…
Jamie Gaehring via farmOS <farm_os@discoursemail.com> escreveu no dia segunda, 27/07/2020 à(s) 21:35:
Glad to hear it!
If you’re interested in contributing to Field Kit translations, just be forewarned, it’s somewhat uncharted territory, and will require at least looking through the code to find strings that need translating. It shouldn’t be too hard, and I’m happy to walk you through it, but just so you know. There are more details on GitHub. I think we’d be ready to start working on that possibly as soon as next week, if @rafaeltcc is still interested in working on it.
Otherwise, please feel free to work on translations for farmOS. Eventually the plan is to integrate those translations with Field Kit, too, so it’s a great place to contribute.
I am organizing myself to contribute 1 night per week to farmOs, so I can contribute with FieldKit. Let´s schedule a day so you can walkthrough me?
I have already prepared my workspace to develop farmOs with phpstorm. But FieldKit is javascript, correct? Do I need to emulate a android environment to debug it in my laptop? Or is there a faster way to start coding?
Sorry for being really late to the discussion…
Hi all, just catching up here… I will argue for leveraging Drupal’s translation system. I’m not sure if/how that might relate to Vue’s I18N plugin (eg: perhaps they can work together?) but we absolutely should avoid having to maintain two separate repositories of translations, IMO. The localize.drupal.org repository is designed to serve this need, and Drupal can already provide translations to JavaScript. I think it will just be a matter of thinking through the best way to link that into Field Kit. I posted a comment to the Field Kit translations issue here describing how Drupal translations in JavaScript work: Pull translations from the farmOS server · Issue #214 · farmOS/field-kit · GitHub
Also dont forget that it can be really confusing if FarmOS uses a different wording then the FieldKit App (like at the moment). At some moments i opened FarmOS and the App side by side to understand thats the meaning of that Category/Unit.
So one source (even if its not perfect) would be better.
Also dont forget that it can be really confusing if FarmOS uses a different wording then the FieldKit App (like at the moment).
Thanks, @andifi, I’d love to know where there are discrepancies between farmOS and Field Kit. I’m not sure if you’re inferring that Categories and Units are the same; they are distinct, but perhaps you meant something else?