-
-
Notifications
You must be signed in to change notification settings - Fork 959
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
ability to edit monolingual template file [$50 awarded] #405
Comments
The editing itself is quite easy (we can pretty much use existing code). But what should be handled carefully:
|
This would be helpful for me too. |
This seems to have quite big demand :-). So let me share my idea how I think it should be implemented, but comments are welcome.
Related topics:
Any suggestions how to make this better? |
Would be nice to have a zen mode for source string editing (not necessary, just nice). |
Another option which might be easier would be to comment out the filtering of the template in subproject: def get_mask_matches(self):
'''
Returns files matching current mask.
'''
prefix = os.path.join(self.get_path(), '')
matches = glob(os.path.join(self.get_path(), self.filemask))
matches = [f.replace(prefix, '') for f in matches]
# Template can have possibly same name as translations
if self.has_template() and self.template in matches: #comment this out
matches.remove(self.template) #comment this out
return matches So that the english version (source) becomes just another language in the subproject. Then editing happens with the regular language editing tools. What would have to change is that if one edits the template, then the sources in the corresponding translation units need to be updated. Either what you described or this way would work fine for me. |
@paulpach That's indeed easier option, but I was just not sure if having the source between translations is good idea. However I'm not using monolingual translations much, so I'm probably not the right person to decide this. Also for some formats (eg. Android), the path for template is different than for translations, but that could be handled as well. |
Any comments on whether it's better to treat the base translation in a same way and list it among translations or to have it separately somewhere in current source strings review page? |
I was trying to fix a period warning just a few minutes ago and I found that the period should be added to the source string instead of removing the period in translated strings. It would be nice to be possible to edit the source string directly on Weblate instead of pushing changes to the repo and try again. I would say listing the source language among translations seems easier to implement and use, while it doesn't make the source language "special" enough. I would also suggest adding a "Source" badge on the list item, and editing a source string should display a hint like "This is the base of all translations. Editing it would update the source string for all other languages". |
In my case, the person editing the source also coordinates with In addition, it seems to me that this way you reuse a lot of code, and I That said, I think both options are quite usable, and he will have no On Fri, Feb 13, 2015 at 7:46 AM, FelisCatus notifications@github.com
|
Also, I do believe that if you ad it to the sources page, I will have to If it is just another language, he will probably be able to figure it out This is not a big deal to me since I will only need to teach him once, but On Fri, Feb 13, 2015 at 8:33 AM, Paul Pacheco paulpach@gmail.com wrote:
|
Okay, I'm on it. |
Users want to be able to edit it as well, we just need to ensure that source strings will get update on editing as well. Issue #405 Signed-off-by: Michal Čihař <michal@cihar.com>
This is needed for editing templates for monolingual translations. Issue #405 Signed-off-by: Michal Čihař <michal@cihar.com>
We will reuse it again for updating source strings. Issue #405 Signed-off-by: Michal Čihař <michal@cihar.com>
Issue #405 Signed-off-by: Michal Čihař <michal@cihar.com>
Issue #405 Signed-off-by: Michal Čihař <michal@cihar.com>
Issue #405 Signed-off-by: Michal Čihař <michal@cihar.com>
Issue #405 Signed-off-by: Michal Čihař <michal@cihar.com>
Issue #405 Signed-off-by: Michal Čihař <michal@cihar.com>
Issue #405 Signed-off-by: Michal Čihař <michal@cihar.com>
Issue #405 Signed-off-by: Michal Čihař <michal@cihar.com>
The basic implementation is there, it would be great if somebody could test it in real life :-). |
Issue #405 Signed-off-by: Michal Čihař <michal@cihar.com>
Issue #405 Signed-off-by: Michal Čihař <michal@cihar.com>
I believe it now works as intended. The change will be deployed to Hosted Weblate later, probably after weekend. |
Tx nijel, working on testing it.... |
BTW: Once you update the code, you will have to reload the translations to make this appear, you can do that using |
Issue #405 [CI skip] Signed-off-by: Michal Čihař <michal@cihar.com>
I can confirm it works perfectly. Thank you! |
would be great to use Weblate as "single source of truth" for all translation activities (and avoid having to give repository access to non-technical colleagues)
The text was updated successfully, but these errors were encountered: