Skip to content

Commit

Permalink
NXDRIVE-2948: Add translations to hardcoded strings and refractor the…
Browse files Browse the repository at this point in the history
… code -moved TaskManager qml into a seperate folder
  • Loading branch information
gitofanindya committed Jul 8, 2024
1 parent 529e146 commit d86bcbc
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions nxdrive/data/qml/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import QtQuick 2.15
import QtQuick.Window 2.15
import SystrayWindow 1.0
import CustomWindow 1.0
import "tasksManager"

QtObject {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import "../"

Button {
id: control
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.2
import QtQuick.Window 2.15
import "icon-font/Icon.js" as MdiFont
import "../icon-font/Icon.js" as MdiFont
import "../"

Rectangle {
id: taskManager
Expand Down
4 changes: 3 additions & 1 deletion nxdrive/gui/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,9 @@ def create_custom_window_for_task_manager(self) -> None:
self.task_manager_window.setMinimumHeight(600)
self._fill_qml_context(self.task_manager_window.rootContext())
self.task_manager_window.setSource(

Check warning on line 395 in nxdrive/gui/application.py

View check run for this annotation

Codecov / codecov/patch

nxdrive/gui/application.py#L391-L395

Added lines #L391 - L395 were not covered by tests
QUrl.fromLocalFile(str(find_resource("qml", file="TaskManager.qml")))
QUrl.fromLocalFile(
str(find_resource("qml/tasksManager", file="TaskManager.qml"))
)
)

def init_workflow(self) -> Workflow:
Expand Down
1 change: 1 addition & 0 deletions tests/functional/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def mocked_open_authentication_dialog():
def test_text_red(manager_factory):
manager = manager_factory(with_engine=False)
manager.application = ""
Translator(find_resource("i18n"), lang="en")

def mocked_open_authentication_dialog():
return
Expand Down

0 comments on commit d86bcbc

Please sign in to comment.