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

ability to edit monolingual template file [$50 awarded] #405

Closed
danackerson opened this issue Oct 30, 2013 · 16 comments
Closed

ability to edit monolingual template file [$50 awarded] #405

danackerson opened this issue Oct 30, 2013 · 16 comments
Assignees
Labels
enhancement Adding or requesting a new feature.
Milestone

Comments

@danackerson
Copy link

danackerson commented Oct 30, 2013

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)

@nijel
Copy link
Member

nijel commented Nov 4, 2013

The editing itself is quite easy (we can pretty much use existing code). But what should be handled carefully:

  • Editing makes sense only for monolingual translations
  • Source strings of all matching units have to be changed in the database upon editing

@paulpach
Copy link

paulpach commented Feb 8, 2015

This would be helpful for me too.

@nijel nijel removed the undecided These features might not be implemented. Can be prioritized by sponsorship. label Feb 10, 2015
@nijel
Copy link
Member

nijel commented Feb 10, 2015

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:

  • The source string review should be probably made more visible on the component page
  • There should be edit icon near source string field while translating leading to source string view for this string

Any suggestions how to make this better?

@paulpach
Copy link

Would be nice to have a zen mode for source string editing (not necessary, just nice).

@paulpach
Copy link

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.

@nijel
Copy link
Member

nijel commented Feb 11, 2015

@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.

@nijel nijel self-assigned this Feb 11, 2015
@nijel nijel added this to the 2.2 milestone Feb 11, 2015
@nijel
Copy link
Member

nijel commented Feb 13, 2015

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?

@FelisCatus
Copy link

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".

@paulpach
Copy link

In my case, the person editing the source also coordinates with
translators. This person should be familiar with how translation needs to
be done in weblate. If he uses the same UI as translators, he might be
able to give them better support.

In addition, it seems to me that this way you reuse a lot of code, and I
will have the shiny feature sooner rather than later :)

That said, I think both options are quite usable, and he will have no
trouble adapting to either one.

On Fri, Feb 13, 2015 at 7:46 AM, FelisCatus notifications@github.com
wrote:

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".


Reply to this email directly or view it on GitHub
https://github.com/nijel/weblate/issues/405#issuecomment-74255246.

@paulpach
Copy link

Also, I do believe that if you ad it to the sources page, I will have to
show him where it is.

If it is just another language, he will probably be able to figure it out
by himself.

This is not a big deal to me since I will only need to teach him once, but
since you clearly care about usability, there is that.

On Fri, Feb 13, 2015 at 8:33 AM, Paul Pacheco paulpach@gmail.com wrote:

In my case, the person editing the source also coordinates with
translators. This person should be familiar with how translation needs to
be done in weblate. If he uses the same UI as translators, he might be
able to give them better support.

In addition, it seems to me that this way you reuse a lot of code, and I
will have the shiny feature sooner rather than later :)

That said, I think both options are quite usable, and he will have no
trouble adapting to either one.

On Fri, Feb 13, 2015 at 7:46 AM, FelisCatus notifications@github.com
wrote:

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".


Reply to this email directly or view it on GitHub
https://github.com/nijel/weblate/issues/405#issuecomment-74255246.

@nijel
Copy link
Member

nijel commented Feb 13, 2015

Okay, I'm on it.

nijel added a commit that referenced this issue Feb 13, 2015
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>
nijel added a commit that referenced this issue Feb 13, 2015
This is needed for editing templates for monolingual translations.

Issue #405

Signed-off-by: Michal Čihař <michal@cihar.com>
nijel added a commit that referenced this issue Feb 13, 2015
We will reuse it again for updating source strings.

Issue #405

Signed-off-by: Michal Čihař <michal@cihar.com>
nijel added a commit that referenced this issue Feb 13, 2015
Issue #405

Signed-off-by: Michal Čihař <michal@cihar.com>
nijel added a commit that referenced this issue Feb 13, 2015
Issue #405

Signed-off-by: Michal Čihař <michal@cihar.com>
nijel added a commit that referenced this issue Feb 13, 2015
Issue #405

Signed-off-by: Michal Čihař <michal@cihar.com>
nijel added a commit that referenced this issue Feb 13, 2015
Issue #405

Signed-off-by: Michal Čihař <michal@cihar.com>
nijel added a commit that referenced this issue Feb 13, 2015
Issue #405

Signed-off-by: Michal Čihař <michal@cihar.com>
nijel added a commit that referenced this issue Feb 13, 2015
Issue #405

Signed-off-by: Michal Čihař <michal@cihar.com>
nijel added a commit that referenced this issue Feb 13, 2015
Issue #405

Signed-off-by: Michal Čihař <michal@cihar.com>
@nijel
Copy link
Member

nijel commented Feb 13, 2015

The basic implementation is there, it would be great if somebody could test it in real life :-).

nijel added a commit that referenced this issue Feb 13, 2015
Issue #405

Signed-off-by: Michal Čihař <michal@cihar.com>
nijel added a commit that referenced this issue Feb 13, 2015
Issue #405

Signed-off-by: Michal Čihař <michal@cihar.com>
@nijel
Copy link
Member

nijel commented Feb 13, 2015

I believe it now works as intended.

The change will be deployed to Hosted Weblate later, probably after weekend.

@nijel nijel closed this as completed Feb 13, 2015
@paulpach
Copy link

Tx nijel, working on testing it....

@nijel
Copy link
Member

nijel commented Feb 13, 2015

BTW: Once you update the code, you will have to reload the translations to make this appear, you can do that using ./manage.py loadpo --all.

nijel added a commit that referenced this issue Feb 13, 2015
Issue #405

[CI skip]

Signed-off-by: Michal Čihař <michal@cihar.com>
@paulpach
Copy link

I can confirm it works perfectly. Thank you!

@nijel nijel changed the title ability to edit monolingual template file [$50] ability to edit monolingual template file [$50 awarded] Feb 21, 2015
@nijel nijel changed the title ability to edit monolingual template file [$50 awarded] ability to edit monolingual template file May 3, 2018
@nijel nijel changed the title ability to edit monolingual template file ability to edit monolingual template file [$50 awarded] May 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding or requesting a new feature.
Projects
None yet
Development

No branches or pull requests

4 participants