After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 740481 - Kinda bookmark file problem
Kinda bookmark file problem
Status: RESOLVED FIXED
Product: gaupol
Classification: Other
Component: general
0.26
Other Linux
: Normal normal
: ---
Assigned To: gaupol-maint@gnome.bugs
gaupol-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2014-11-21 09:31 UTC by Marek
Modified: 2014-12-04 00:21 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Marek 2014-11-21 09:31:34 UTC
I'm opening a file which have bookmarks. I can see only one bookmark and error screen pops up. After closing it everything seems to work as usual.


Traceback

File: /usr/share/gaupol/extensions/bookmarks/bookmarks.py
Line: 399
In: _on_tree_view_selection_changed

    col = page.view.get_focus()[1]

AttributeError: 'NoneType' object has no attribute 'view'

Environment

Platform: Linux-3.16.0-23-generic-i686-with-Ubuntu-14.10-utopic
Locale: pl_PL.utf_8

Libraries

Python: 3.4.2
GTK+: 3.12.2
PyGObject: 3.14.0
GStreamer: 1.4.3.0

Python Packages

aeidon: 0.26
gaupol: 0.26
enchant: 1.6.6
chardet: 2.2.1
Comment 1 Osmo Salomaa 2014-11-21 20:50:39 UTC
Thanks for noticing. It seems that the list of bookmarks in the sidebar is not cleared when closing the corresponding file and causes some data mismatches. I'll fix it soon.

In the mean time, you should be able to avoid triggering this bug by always quitting Gaupol entirely when you want to close a file with bookmarks.
Comment 2 Osmo Salomaa 2014-11-22 14:21:37 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.

commit c1e2f63b31f97a15df033da44d330f1fc7e68e7a
Author: Osmo Salomaa <otsaloma@iki.fi>
Date:   Sat Nov 22 16:19:33 2014 +0200

    Fix updating bookmarks tree view when a file is closed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=740481

https://github.com/otsaloma/gaupol/commit/c1e2f63b31f97a15df033da44d330f1fc7e68e7a
Comment 3 Marek 2014-11-23 11:47:58 UTC
Thank you for the fix. I need to add something to my previous message however. My fault was I wasn't quite honest with you. What I have not said is I added a bookmark with a program, but later did not saved the changes! It would also save a subfile which I had to avoid, due to work with translation. When you use two files a bookmark is assigned only to the source one. Instead, I was using 'echo' on my Linux terminal to update the bookmark file, expecting the program to handle it as at normal file loading.

It is because Gaupol could have a feature that would prove itself to be very handy. Hope I can describe it here: I'm working with a project which has 2k lines and with a ready translation which is NOT made to this version of my movie. The translation has different line number, due to the original translator joined many of them together. Also some dialogues are not present in the original subfile, because of different cut of the movie!

For me it is still easier to add new lines to the translation, cut and paste text and have the translation file synced later by Gaupol. However after adding many new lines I begin to lose control on it and to get a grip I have to reload the translation. In the current state of the program all I can do to "reload" is to save the translation without saving the source. Such option does not exist. So to "reload" means begin again by loading both files which is, well tedious job :-)

Can you please add such a feature? Both in fact. Closing just translation could help, but reloading it with subtitles number option on would be much much better. BTW: judging by experience this, if one wants to open a translation with line numbers or subtitles positions, could be an option. It is faster to load a translation by using Open Recent Translation menu but in this case Gaupol always opens such file with subtitles position on, which in the case described above is useless.

Other priceless feature would be to be able to add/delete lines in both files SEPARATELY. Also, sometimes a translator will want to add some lines of text which appear on the screen only like "Tree weeks later" for example. In this case such lines should be added to the source file or everything goes out of sync.

Regards and thank you for developing best subtitle program out there :-)
Marek
Comment 4 Osmo Salomaa 2014-11-23 14:43:37 UTC
(In reply to comment #3)
> For me it is still easier to add new lines to the translation, cut and paste
> text and have the translation file synced later by Gaupol. However after adding
> many new lines I begin to lose control on it and to get a grip I have to reload
> the translation.

I don't quite understand. What do you mean by "lose control"? How does a "reload" change the data or alignment?

Some general notes:

 * When translating, you shouldn't try to avoid changing the main file -- trying to do so probably just results in trouble. Keep the original stashed somewhere, but use a "working copy" for the translation process where subtitle additions, splits and merges match your translation file. Regarding alignment, I'd suggest using position alignment for the initial opening, then keep saving both files and use the number alignment for futher opens.

 * It's somewhat difficult to strike a good balance in the GUI for translating vs. not translating. I want to avoid having the GUI become full actions that users who don't do translations never use.

 * I have sometimes considered adding a "project file", which would just be a text file listing the main, translation and video filenames and perhaps some metadata. This would allow quickly opening the combination, but I'm not convinced about the added complexity and I have never gotten around to it.

 * If you're comfortable using shell scripts and a terminal, you can effectively write the associated filename definitions into a shell script (see gaupol --help) and run that to start quickly Gaupol into a project environment. You can probably write a desktop file too, but you'll need full paths for that.
Comment 5 Marek 2014-12-01 15:52:30 UTC
Hello again :-) I tried to answer by email but it turns it's not possible. Here's the copy of what I wrote:



Thank you for a quick replay. Wish mine could be so :-)


> I don't quite understand. What do you mean by "lose control"?
OK, so the situation was this: The translation lines had to be split in
order to get the file synced. Or in original there were 2 or 3 lines of
text, while in the translation was only 1. What do you do in such
situation. Your looking for another file :-)  This wasn't available.
What other options do you have? You could just extend the hiding times
of the subs, but what if a starting ones are incorrect? If you work with
a project like I had right now, you add lines to the translation only.
There is no such option. So you keep adding lines copying/pasting
translation texts and after you have added some many new lines the "go
out of the screen" you lose control. You need to scroll or "reload". The
latter is better, at least  was for me.

>  How does a "reload" change the data or alignment?
Alignment only, that's what it's for. New lines comes only in 1 file right? See below...


>  * When translating, you shouldn't try to avoid changing the main file --
If I wasn't doing it, the above would be meaningless - translation's new
lines would get synced this those dummies ones in the original file.

>  * It's somewhat difficult to strike a good balance in the GUI for translating
> vs. not translating. I want to avoid having the GUI become full actions that
> users who don't do translations never use.
Why? Yes, the program would be more complex but also more robust. I
guess a 'translation menu' would do this - those who don't need it never
look there.

>  * I have sometimes considered adding a "project file",
Yes, like a bookmark file. Pretty useful for some people, although...

>  * If you're comfortable using shell scripts and a terminal,
Just starting it in the CLI mode was VERY useful - I found every needed
options there, so  for me the above solution would be probably
unnecessary.
BTW this mode reveals something I have forgotten about - Gaupol says:
"GStreamer found, but textoverlay missing. Try installing
gst-plugins-base". However...
marko@asus:~$ dpkg -l | grep gst-plugins-base
  gir1.2-gst-plugins-base-1.0    1.4.3-1ubuntu1

I haven't searched other Debian-based distros, but Lubuntu I use is
derived from Ubuntu and as shown here uses Ubuntu's packages, which are
derived from... So I guess the package named is just different now.

Thank you, Marek
Comment 6 Osmo Salomaa 2014-12-02 21:06:49 UTC
(In reply to comment #5)
> OK, so the situation was this: The translation lines had to be split in
> order to get the file synced. Or in original there were 2 or 3 lines of
> text, while in the translation was only 1.

I think I understand now. You can run into this kind of an issue. In most cases I think it should be avoidable by choice of a suitable workflow, i.e. how you do the split/merge, insert/delete, copy/paste etc., but it of course depends on the subtitles you're working with. Another workflow might or might not have been possible in your case.

I don't like the idea of reload, since that means things have already gone wrong. Neither do I like inserting subtitles to translation only, since it goes against having the basic idea of keeping structure in sync. But if you have ideas for the basic tools (split/merge, insert/remove, copy/paste etc.) to make this kind of work easier, please file separate bug reports for those.

> BTW this mode reveals something I have forgotten about - Gaupol says:
> "GStreamer found, but textoverlay missing. Try installing
> gst-plugins-base". However...
> marko@asus:~$ dpkg -l | grep gst-plugins-base
>   gir1.2-gst-plugins-base-1.0    1.4.3-1ubuntu1

That "gir1.2-gst-plugins-base-1.0" is the correct package name in Debian. If that's the whole output, then you don't have it installed. dpkg should print "ii" at the start of the line.

GStreamer dependencies of the Debian package have just been updated in 0.27 to be correct and complete.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=761218
Comment 7 Marek 2014-12-03 23:19:11 UTC
> I think I understand now.
...
> I don't like the idea of reload, since that means things have already gone
> wrong. Neither do I like inserting subtitles to translation only, since it goes
> against having the basic idea of keeping structure in sync.
If you say what's above then no, you still don't understand it :-)
Nothing's gone wrong. It just a workflow. Just these 2 files, which
didn't fit together. I really don't expect to find many of such cases.

Another example of using this is syncing a translation meant, say for
HDTV version, to WEB-DL. The latter version usually provides text for
hearing impaired, while HDTV does not. So what's the quickest (in my
opinion) method to sync a HDTV translation to WEB-DL? Just cut out those
lines with square brackets (or whatever else they are) and do a
"reload" & save. Again, nothing is wrong - it's just the way it is :-)

And as of the "reload idea" - it is more like a refresh, to not lose the
grip of where in text you are.

> But if you have
> ideas for the basic tools (split/merge, insert/remove, copy/paste etc.) to make
> this kind of work easier, please file separate bug reports for those.
Was thinking a bit. What I came with was a special marker (say: **N1),
which on the reload would cause such marked text be cut and pasted in a
newline. The 1 (could be omitted) after N means on the first next line.
And yes, I know what you might be thinking right now :-) Pretty bad
one :-)


> > marko@asus:~$ dpkg -l | grep gst-plugins-base
> >   gir1.2-gst-plugins-base-1.0    1.4.3-1ubuntu1
> 
> That "gir1.2-gst-plugins-base-1.0" is the correct package name in Debian. If
> that's the whole output, then you don't have it installed. dpkg should print
> "ii" at the start of the line.
No, it's OK. The output is filtered by grep so the package is on the
system. I couldn't know you mind it :-) 

> GStreamer dependencies of the Debian package have just been updated in 0.27 to
> be correct and complete.
Correct. I have Vivid (which is Ubuntu 15.4) installed on a VM and it's
OK there. Utopic probably won't include v. 0.27 in the repos.

Thank you, Marek
Comment 8 Osmo Salomaa 2014-12-04 00:21:55 UTC
(In reply to comment #7)

If this was a rare case we can forget about it, but for more common cases like your example below, I'd appreciate those bug reports if things are too difficult. I'd like to see these matters thought through a convenient workflow (regardless of application used!) for a particular task and then required tools to suport that workflow. It would also be useful to have documentation for those worflows to complete common tasks. Like the only one [1] written so far.

[1] https://wiki.gnome.org/Apps/Gaupol/CreatingSubtitles

> Another example of using this is syncing a translation meant, say for
> HDTV version, to WEB-DL. The latter version usually provides text for
> hearing impaired, while HDTV does not. So what's the quickest (in my
> opinion) method to sync a HDTV translation to WEB-DL? Just cut out those
> lines with square brackets (or whatever else they are) and do a
> "reload" & save. Again, nothing is wrong - it's just the way it is :-)

> Was thinking a bit. What I came with was a special marker (say: **N1),
> which on the reload would cause such marked text be cut and pasted in a
> newline. The 1 (could be omitted) after N means on the first next line.
> And yes, I know what you might be thinking right now :-) Pretty bad
> one :-)

Oh, no, no, no such magic, no.