Commit graph

1072 commits

Author SHA1 Message Date
Swann Martinet 131990a41d
Translated using Weblate (French)
Currently translated at 91.4% (782 of 856 strings)

Translation: Manuskript/Translations
Translate-URL: https://hosted.weblate.org/projects/manuskript/translations/fr/
2019-08-25 03:24:03 +02:00
Curtis Gedak 65fb184f60 Rename setting "Save on quit" to "Save on project close"
See PR #615

This rename is being done to clarify that when a user enables "Save on
project close" then the project will be saved whenever the user
chooses to close the project or to quit Manuskript.

Note that the actual name of the setting saveOnQuit should also be
changed but instead has been marked as a future TODO because it
involves a change in the project file format.
2019-08-22 15:18:18 -06:00
Curtis Gedak f4c8108b28 Do not prompt "Save project?" when _Save on quit_ setting enabled
See PR #615

The Travis CI tests began failing after merging Pull Request #583.

Log snippet:

----------------------------------------------------------------------
...
Ref not implemented
PASSED
manuskript/tests/ui/test_welcome.py::test_autoLoad QXcbConnection: XCB error: 8 (BadMatch), sequence: 613, resource id: 2097162, major code: 42 (SetInputFocus), minor code: 0
QXcbConnection: XCB error: 8 (BadMatch), sequence: 619, resource id: 2097168, major code: 42 (SetInputFocus), minor code: 0
QXcbConnection: XCB error: 8 (BadMatch), sequence: 625, resource id: 2097171, major code: 42 (SetInputFocus), minor code: 0
----------------------------------------------------------------------

When running "pytest -vs" locally, which is a command used in our
.travis.yml file, a dialog to "Save project?" is displayed.  Because
the test scripts use the "saveOnQuit" default setting of *enabled*,
the "Save project?" dialog should not be displayed.

In other words when a call is made to close the project, a "Save
project?" dialog is incorrectly displayed because the dirtyProject
flag is set, but so too is saveOnQuit set to True.  What should happen
is an automatic save with no prompt.  This PR fixes this logic so that
the Travis CI test suite completes successfully.
2019-08-22 15:18:18 -06:00
Elizabeth Sherrock 7627c5aa35
Translated using Weblate (Chinese (Simplified))
Currently translated at 81.7% (699 of 856 strings)

Translation: Manuskript/Translations
Translate-URL: https://hosted.weblate.org/projects/manuskript/translations/zh_Hans/
2019-08-16 17:24:08 +02:00
PanDedoctor b37c76ae5d
Translated using Weblate (Polish)
Currently translated at 98.7% (845 of 856 strings)

Translation: Manuskript/Translations
Translate-URL: https://hosted.weblate.org/projects/manuskript/translations/pl/
2019-08-13 14:24:07 +02:00
Mateusz Mendel 8f797847b0
Translated using Weblate (Polish)
Currently translated at 98.7% (845 of 856 strings)

Translation: Manuskript/Translations
Translate-URL: https://hosted.weblate.org/projects/manuskript/translations/pl/
2019-08-13 14:24:07 +02:00
Jan Wester 34f84126df Fixed race when closing an auto-saving project.
Turning off the timer for saveTimerNoChanges just like the code
already did in closeProject() for saveTimer fixes this bug. Easy.

But how to prevent this kind of race condition in the future?

Several related routines have been adjusted to fail gracefully or report
a bug to the console when something goes wrong, depending on what is
most suitable for that bit of logic.
2019-08-12 10:35:07 -06:00
Jan Wester 97cf0e1373 Track dirty state and have the UI respect it
Intending to learn more about the way Manuskript goes about saving the
project in order to figure out how to tackle some recent saving-related
issues, I stumbled into learning that Manuskript likes to save data a
whole lot. Too much, in fact. When I close the project with unsaved
changes, I expected those changes to not be saved... but they were. This
completely subverts my expectations of a program using typical
file-based operations involving opening, saving and closing files.

There are three more settings that influence when the program saves, and
I personally consider them a bit overkill or even detrimental to the
stated purpose. What if Manuskript forces a save when nothing was
changed and something goes wrong? Saving too much can in fact be
dangerous!

For now, I have left existing functionality as-is, but I would prefer to
respect the dirty flag I have introduced in this commit for at least the
'save-on-quit' and 'save every X minutes' features. (The third is
smarter and only triggers after noticing changes, so it is less
important.)

Making sure the dirty flag works as expected is the first step in making
such changes in the future.

UI-wise, this commit now offers the user the opportunity to save their
changes, discard them, or outright cancel their action entirely when
performing a destructive action on a dirty project. As of this commit, I
have identified two of such scenarios:

1) closing the project,
2) closing the window with save-on-quit turned off.

If I missed any, do let me know. But for now, maybe now I can finally
start digging into those issues that sent me down this rabbit hole...
2019-08-12 10:35:07 -06:00
PanDedoctor 65a2c83b35
Translated using Weblate (Polish)
Currently translated at 82.1% (703 of 856 strings)

Translation: Manuskript/Translations
Translate-URL: https://hosted.weblate.org/projects/manuskript/translations/pl/
2019-08-12 13:48:33 +02:00
Mateusz Mendel c4adb4f67b
Translated using Weblate (Polish)
Currently translated at 82.1% (703 of 856 strings)

Translation: Manuskript/Translations
Translate-URL: https://hosted.weblate.org/projects/manuskript/translations/pl/
2019-08-12 13:48:33 +02:00
Allan Nordhøy db1ce406ac
Translated using Weblate (Norwegian Bokmål)
Currently translated at 96.8% (829 of 856 strings)

Translation: Manuskript/Translations
Translate-URL: https://hosted.weblate.org/projects/manuskript/translations/nb_NO/
2019-08-03 20:23:30 +02:00
Allan Nordhøy c8e5bd53c9
Translated using Weblate (Norwegian Bokmål)
Currently translated at 96.7% (828 of 856 strings)

Translation: Manuskript/Translations
Translate-URL: https://hosted.weblate.org/projects/manuskript/translations/nb_NO/
2019-08-01 07:13:22 +02:00
Daan 9ea58c516e
Translated using Weblate (Dutch)
Currently translated at 92.8% (794 of 856 strings)

Translation: Manuskript/Translations
Translate-URL: https://hosted.weblate.org/projects/manuskript/translations/nl/
2019-08-01 07:13:21 +02:00
Curtis Gedak 60b6f98c21 Fix Travis CI build error on Linux - pyenv: version `3.6.3' not installed
The Travis CI builds are failing with the following messages:

    pyenv local 3.6.3
    pyenv: version `3.6.3' not installed

Fix by increasing python version to 3.6.7.
2019-07-31 13:06:10 -06:00
Curtis Gedak 5f9ea3baa5 Fix crash when setting word Goal on new Text (scene) in Outline pane
See issue #561.

The problem appears to be a due to a combination of factors, such as:

- Python does not automatically convert an empty/blank variable to the
  integer zero (0)
- Default goal value is empty/blank for a new Text (scene)
- Asynchronous events can occur such that the change in the Outline
  pane of a new Text (scene) goal from empty/blank to a value is not
  saved to the data model prior to the update event in the Editor pane
  accessing the model value for the word count progress display.

Steps to Reproduce:

1. Start manuskript and create new project (no template).

2. Select **Outline** pane.

3. Click "Text Plus" icon to create a text (default name "New")

4. Select **Editor** pane.

5. Click on **New** to display empty text.

6. Select **Outline** pane.

7. Double-click the empty area on **New** line under title **Goal**,
  type in "300", and press **Enter**.

   Note that manuskript crashes with a segmentation fault.

Work around the crash by using the already existing manuskript
function toInt() which handles conversion of empty/blank values to
integer value zero (0).
2019-07-31 10:46:06 -06:00
Pedro Albuquerque 8d3fd92b12
Translated using Weblate (Portuguese (Portugal))
Currently translated at 100.0% (857 of 857 strings)

Translation: Manuskript/Translations
Translate-URL: https://hosted.weblate.org/projects/manuskript/translations/pt_PT/
2019-07-16 18:05:52 +02:00
Riccardo Mangili bfe438a67d
Translated using Weblate (Italian)
Currently translated at 100.0% (856 of 856 strings)

Translation: Manuskript/Translations
Translate-URL: https://hosted.weblate.org/projects/manuskript/translations/it/
2019-07-16 18:05:51 +02:00
Curtis Gedak dc51f6d84e Add new language translations to the Settings window 2019-07-14 10:11:52 -06:00
Curtis Gedak 21845fabb7 Update all language translation source .ts files
Update the language translation source '.ts' files with the
translatable strings in the source code with the following command:

$ make translation

This effectively runs the following command:

$ pylupdate5 -noobsolete i18n/manuskript.pro
2019-07-14 10:04:16 -06:00
Curtis Gedak a6ad70f33f Compile all language translation updates into respective .qm files
After updating the '.ts' translation source files from weblate,
compile all of the language translations into '.qm' files.

This was done with the following command:

$ make i18n

This effectively runs the 'lrelease' command on each '.ts' file.  For
example:

$ lrelease i18n/manuskript_es.ts
2019-07-14 10:01:27 -06:00
Curtis Gedak 3f7445657b Add all current weblate languages to i18n/manuskript.pro 2019-07-14 09:58:15 -06:00
Curtis Gedak 0c53fad09d Merge remote-tracking branch 'weblate/develop' into develop
Merge the weblate language translations with the following commands:

    git remote update weblate
    git checkout develop
    git merge weblate/develop
2019-07-14 09:54:39 -06:00
Ali Khomami P 762ffbcb47
Added translation using Weblate (Persian) 2019-07-11 22:44:41 +02:00
Chris 38d3c93633
Added translation using Weblate (English (United Kingdom)) 2019-07-06 23:39:34 +02:00
Allan Nordhøy 28a00b4b81
Translated using Weblate (Norwegian Bokmål)
Currently translated at 97.0% (828 of 854 strings)

Translation: Manuskript/Translations
Translate-URL: https://hosted.weblate.org/projects/manuskript/translations/nb_NO/
2019-06-18 21:05:57 +02:00
Nick de Bruin 043b42eb34
Translated using Weblate (Dutch)
Currently translated at 92.4% (789 of 854 strings)

Translation: Manuskript/Translations
Translate-URL: https://hosted.weblate.org/projects/manuskript/translations/nl/
2019-06-18 21:05:54 +02:00
Stefano Romanò 3afc9c8de7
Translated using Weblate (Italian)
Currently translated at 100.0% (854 of 854 strings)

Translation: Manuskript/Translations
Translate-URL: https://hosted.weblate.org/projects/manuskript/translations/it/
2019-06-18 21:05:52 +02:00
ssantos 3a8ba77499
Translated using Weblate (German)
Currently translated at 93.6% (799 of 854 strings)

Translation: Manuskript/Translations
Translate-URL: https://hosted.weblate.org/projects/manuskript/translations/de/
2019-06-18 21:05:50 +02:00
Allan Nordhøy 761be5784a Spelling: Manuscript, could not, process, … No content (#588)
* Spelling: Plaintext, Manuscript, could not, process, … No content

* Reverted to "plain text"
2019-06-06 11:55:24 -06:00
NocturnalFred 995eda101f fix issue #468 'unit' is reset 2019-06-05 10:34:11 -06:00
Riccardo Mangili 5b6deb8c8c
Translated using Weblate (Italian)
Currently translated at 100.0% (854 of 854 strings)

Translation: Manuskript/Translations
Translate-URL: https://hosted.weblate.org/projects/manuskript/translations/it/
2019-06-02 20:08:21 +02:00
kutunesirka 78808487ef
Translated using Weblate (Japanese)
Currently translated at 75.9% (648 of 854 strings)

Translation: Manuskript/Translations
Translate-URL: https://hosted.weblate.org/projects/manuskript/translations/ja/
2019-06-02 12:46:45 +02:00
Curtis Gedak 1711f8decf Fix pandoc export crashes is project title is empty
Fixes #535
2019-05-31 10:19:04 -06:00
Youness Alaoui a8ec6512c9 Fix crash if invalid character is inserted into the text.
If an invalid character is inserted into the text, such as a "^L" (ASCII 0x0C)
when copy-pasting from a google document that has a page break in it, a crash
will happen as the character cannot be inserted into XML. This patch removes
those invalid characters from the text so the revisions.xml can be saved.

Fixes #562
2019-05-21 09:52:18 -06:00
Viktor S 95c86d236a
Translated using Weblate (Russian)
Currently translated at 99.9% (853 of 854 strings)

Translation: Manuskript/Translations
Translate-URL: https://hosted.weblate.org/projects/manuskript/translations/ru/
2019-05-21 14:44:18 +02:00
kutunesirka dd98aed1ed
Translated using Weblate (Japanese)
Currently translated at 43.1% (368 of 854 strings)

Translation: Manuskript/Translations
Translate-URL: https://hosted.weblate.org/projects/manuskript/translations/ja/
2019-05-21 14:43:46 +02:00
Youness Alaoui f1baab8b3a Fix crash if using a custom pandoc installation
Fixes #563
2019-05-20 09:39:45 -06:00
Youness Alaoui 3dfb43f6c1 Center dialog for the frequency analyzer too. 2019-05-20 09:25:17 -06:00
Youness Alaoui e4da844708 Fix dialog windows being created outside the desktop area
The About/Settings/Import/Export/ExportManager windows were all created
in odd places, usually to the left of the main window, which meant outside the
desktop area with little overlap if the main window is maximized. The logic in
centering the window on its parent was wrong. This fixes it.
2019-05-20 09:25:17 -06:00
Jan Wester 12390a9aab Fix occasional crashes when (re)moving items
Describing all the rabbitholes that I and kakaroto have gone through
while debugging this one until dawn can frankly not do enough justice to
the crazy amount of rubberducking that went on while trying to fix this.

This bug would be triggered whenever you had a document open in the
editor and then moved an ancestor object downwards (visually) in the tree.
Or when you simply deleted the ancestor. Depending on the exact method
that caused the opened item to be removed from the internal model, the
exact nature of the bug would vary, which means this commit fixes a few
different bits of code that lead to what appears to be the same bug.

In order of appearance, the bugs that ruined our sleep were:

1) The editor widget was trying to handle the removed item at too late a
stage.

2) The editor widget tried to fix its view after a move by searching for
the new item with the same ID, but in the case of moving an object down
it came across its own old item, ruining the attempt.

3) The editor widget did not properly account for the hierarchical
nature of the model.

Upon fixing these the next day, it was revealed that:

4) The outlineItem.updateWordCount(emit=False) flag is broken. This
function would call setData() in several spots which would still cause
emits to bubble through the system despite emit=False, and we simply got
lucky that it stopped enough of them until now.

This last one was caused by a small mistake in the fixes for the first
three bugs, but it has led to a couple of extra changes to make any
future bug hunts slightly less arduous and frustrating:

a) When calling item.removeChild(c), it now resets the associated parent
and model to mirror item.insertChild(c). This has also led to an extra
check in model.parent() to check for its validity.

b) The outlineItem.updateWordCount(emit=) flag has been removed entirely
and it now emits away with reckless abandon. I have been unable to
reproduce the crashes the code warned about, so I consider this a code
quality fix to prevent mysterious future issues where things sometimes
do not properly update right.

Worthy of note is that the original code clearly showed the intention to
close tabs for items that were removed. Reworking the editor to support
closing a tab is unfortunately way out of scope, so this intention was
left in and the new fix was structured to make it trivial to implement
such a change when the time comes. An existing FIXME regarding unrelated
buggy editor behaviour was left in, too.

Many thanks to Kakaroto for burning the midnight oil with me to get to
the bottom of this. (I learned a lot that night!)

Issues #479, #516 and #559 are fixed by this commit. And maybe some others,
too.
2019-05-19 09:33:19 -06:00
kutunesirka 96b5e006b0
Translated using Weblate (Japanese)
Currently translated at 28.2% (241 of 854 strings)

Translation: Manuskript/Translations
Translate-URL: https://hosted.weblate.org/projects/manuskript/translations/ja/
2019-05-18 17:49:21 +02:00
kutunesirka 36e3f0b427
Added translation using Weblate (Japanese) 2019-05-17 11:57:10 +02:00
Jan-Niklas Meier 385396c089 trying to resolve full screen exit issues on macOS 2019-05-03 09:41:39 -06:00
Hosted Weblate 6e3bfaafdf
Merge branch 'origin/develop' into Weblate. 2019-05-01 18:06:46 +02:00
Omer Acar 1f4e902e96
Translated using Weblate (Turkish)
Currently translated at 11.7% (100 of 854 strings)

Translation: Manuskript/Translations
Translate-URL: https://hosted.weblate.org/projects/manuskript/translations/tr/
2019-05-01 18:06:46 +02:00
Raphael Wimmer 5ab745be2f Fix typos in translation format placeholders ({] → {}) that lead to crash 2019-05-01 10:03:12 -06:00
Omer Acar f55325a0d4
Added translation using Weblate (Turkish) 2019-04-30 19:09:49 +02:00
Youness Alaoui d513351162 spellchecker: Add file header to spellchecker.py 2019-04-30 09:54:31 -06:00
Youness Alaoui 4f7c81bbff spellcheck: Handle use case of a dictionary becoming unavailable. 2019-04-30 09:54:31 -06:00
Youness Alaoui 5c33ce54f3 spellcheck: show 'add to dictionary' even if a word has no suggestions 2019-04-30 09:54:31 -06:00