Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-client-qt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-client-qt
Commits
e53534b4
Commit
e53534b4
authored
4 years ago
by
Ming Rui Zhang
Browse files
Options
Downloads
Patches
Plain Diff
messagewebview: remove jed.js and provide i18n strings for chatview
Change-Id: Ica3e4af26e8e62d7fec1b58959a8604f90ac627c
parent
e7f24d01
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
resources.qrc
+0
-1
0 additions, 1 deletion
resources.qrc
src/constant/JamiStrings.qml
+31
-0
31 additions, 0 deletions
src/constant/JamiStrings.qml
src/mainview/components/MessageWebView.qml
+41
-10
41 additions, 10 deletions
src/mainview/components/MessageWebView.qml
with
72 additions
and
11 deletions
resources.qrc
+
0
−
1
View file @
e53534b4
...
...
@@ -78,7 +78,6 @@
<file alias="chatview.css">../lrc/src/web-chatview/chatview.css</file>
<file alias="chatview.html">../lrc/src/web-chatview/chatview.html</file>
<file alias="chatview.js">../lrc/src/web-chatview/chatview.js</file>
<file alias="jed.js">../lrc/src/web-chatview/jed.js</file>
<file alias="linkify.js">../lrc/src/web-chatview/linkify.js</file>
<file alias="linkify-html.js">../lrc/src/web-chatview/linkify-html.js</file>
<file alias="linkify-string.js">../lrc/src/web-chatview/linkify-string.js</file>
...
...
This diff is collapsed.
Click to expand it.
src/constant/JamiStrings.qml
+
31
−
0
View file @
e53534b4
...
...
@@ -387,4 +387,35 @@ Item {
// Generic dialog options
property
string
optionOk
:
qsTr
(
"
Ok
"
)
property
string
optionCancel
:
qsTr
(
"
Cancel
"
)
// ChatView
property
string
backButtonTitle
:
qsTr
(
"
Hide chat view
"
)
property
string
placeCallButtonTitle
:
qsTr
(
"
Place video call
"
)
property
string
placeAudioCallButtonTitle
:
qsTr
(
"
Place audio call
"
)
property
string
addToConversationsButtonTitle
:
qsTr
(
"
Add to conversations
"
)
property
string
unbanButtonTitle
:
qsTr
(
"
Unban contact
"
)
property
string
sendButtonTitle
:
qsTr
(
"
Send
"
)
property
string
optionsButtonTitle
:
qsTr
(
"
Options
"
)
property
string
backToBottomBtnInnerHTML
:
qsTr
(
"
Jump to latest
"
)
property
string
sendFileButtonTitle
:
qsTr
(
"
Send file
"
)
property
string
videoRecordButtonTitle
:
qsTr
(
"
Leave video message
"
)
property
string
audioRecordButtonTitle
:
qsTr
(
"
Leave audio message
"
)
property
string
acceptButtonTitle
:
qsTr
(
"
Accept
"
)
property
string
refuseButtonTitle
:
qsTr
(
"
Refuse
"
)
property
string
blockButtonTitle
:
qsTr
(
"
Block
"
)
property
string
messageBarInputPlaceholder
:
qsTr
(
"
Type a message
"
)
property
string
placeHolderTemporaryContact
:
qsTr
(
"
Note: an interaction will create a new contact.
"
)
property
string
isNotInYourContacts
:
qsTr
(
"
is not in your contacts
"
)
property
string
automaticallyAcceptInvitation
:
qsTr
(
"
Note: you can automatically accept this invitation by sending a message.
"
)
property
string
daysAgo
:
qsTr
(
"
days ago
"
)
property
string
dayAgo
:
qsTr
(
"
day ago
"
)
property
string
hoursAgo
:
qsTr
(
"
hours ago
"
)
property
string
hourAgo
:
qsTr
(
"
hour ago
"
)
property
string
minutesAgo
:
qsTr
(
"
minutes ago
"
)
property
string
justNow
:
qsTr
(
"
just now
"
)
property
string
failureString
:
qsTr
(
"
Failure
"
)
property
string
acceptString
:
qsTr
(
"
Accept
"
)
property
string
refuseString
:
qsTr
(
"
Refuse
"
)
property
string
deleteString
:
qsTr
(
"
Delete
"
)
property
string
retryString
:
qsTr
(
"
Retry
"
)
}
This diff is collapsed.
Click to expand it.
src/mainview/components/MessageWebView.qml
+
41
−
10
View file @
e53534b4
...
...
@@ -108,11 +108,9 @@ Rectangle {
QtObject
{
id
:
jsBridgeObject
// ID, under which this object will be known at chatview.js side.
WebChannel.id
:
"
jsbridge
"
// Functions that are exposed, return code can be derived from js side
// by setting callback function.
function
deleteInteraction
(
arg
)
{
...
...
@@ -193,6 +191,40 @@ Rectangle {
function
onComposing
(
isComposing
)
{
MessagesAdapter
.
onComposing
(
isComposing
)
}
function
parseI18nData
()
{
return
{
[
"
backButtonTitle
"
]
:
JamiStrings
.
backButtonTitle
,
[
"
placeCallButtonTitle
"
]
:
JamiStrings
.
placeCallButtonTitle
,
[
"
placeAudioCallButtonTitle
"
]
:
JamiStrings
.
placeAudioCallButtonTitle
,
[
"
addToConversationsButtonTitle
"
]
:
JamiStrings
.
addToConversationsButtonTitle
,
[
"
unbanButtonTitle
"
]
:
JamiStrings
.
unbanButtonTitle
,
[
"
sendButtonTitle
"
]
:
JamiStrings
.
sendButtonTitle
,
[
"
optionsButtonTitle
"
]
:
JamiStrings
.
optionsButtonTitle
,
[
"
backToBottomBtnInnerHTML
"
]
:
JamiStrings
.
backToBottomBtnInnerHTML
,
[
"
sendFileButtonTitle
"
]
:
JamiStrings
.
sendFileButtonTitle
,
[
"
videoRecordButtonTitle
"
]
:
JamiStrings
.
videoRecordButtonTitle
,
[
"
audioRecordButtonTitle
"
]
:
JamiStrings
.
audioRecordButtonTitle
,
[
"
acceptButtonTitle
"
]
:
JamiStrings
.
acceptButtonTitle
,
[
"
refuseButtonTitle
"
]
:
JamiStrings
.
refuseButtonTitle
,
[
"
blockButtonTitle
"
]
:
JamiStrings
.
blockButtonTitle
,
[
"
messageBarInputPlaceholder
"
]
:
JamiStrings
.
messageBarInputPlaceholder
,
[
"
placeHolderTemporaryContact
"
]
:
JamiStrings
.
placeHolderTemporaryContact
,
[
"
isNotInYourContacts
"
]
:
JamiStrings
.
isNotInYourContacts
,
[
"
automaticallyAcceptInvitation
"
]
:
JamiStrings
.
automaticallyAcceptInvitation
,
[
"
daysAgo
"
]
:
JamiStrings
.
daysAgo
,
[
"
dayAgo
"
]
:
JamiStrings
.
dayAgo
,
[
"
hoursAgo
"
]
:
JamiStrings
.
hoursAgo
,
[
"
hourAgo
"
]
:
JamiStrings
.
hourAgo
,
[
"
minutesAgo
"
]
:
JamiStrings
.
minutesAgo
,
[
"
justNow
"
]
:
JamiStrings
.
justNow
,
[
"
failureString
"
]
:
JamiStrings
.
failureString
,
[
"
acceptString
"
]
:
JamiStrings
.
acceptString
,
[
"
refuseString
"
]
:
JamiStrings
.
refuseString
,
[
"
deleteString
"
]
:
JamiStrings
.
deleteString
,
[
"
retryString
"
]
:
JamiStrings
.
retryString
}
}
}
WebEngineView
{
...
...
@@ -245,9 +277,6 @@ Rectangle {
"
chatwin
"
,
UtilsAdapter
.
qStringFromFile
(
"
:/chatview-windows.css
"
)))
messageWebView
.
runJavaScript
(
UtilsAdapter
.
qStringFromFile
(
"
:/jed.js
"
))
messageWebView
.
runJavaScript
(
UtilsAdapter
.
qStringFromFile
(
"
:/linkify.js
"
))
messageWebView
.
runJavaScript
(
UtilsAdapter
.
qStringFromFile
(
...
...
@@ -256,11 +285,13 @@ Rectangle {
"
:/linkify-string.js
"
))
messageWebView
.
runJavaScript
(
UtilsAdapter
.
qStringFromFile
(
"
:/qwebchannel.js
"
))
messageWebView
.
runJavaScript
(
UtilsAdapter
.
qStringFromFile
(
"
:/chatview.js
"
),
function
(){
jsLoaded
=
true
})
messageWebView
.
runJavaScript
(
"
init_i18n();
"
)
messageWebView
.
runJavaScript
(
"
displayNavbar(false);
"
)
messageWebView
.
runJavaScript
(
UtilsAdapter
.
qStringFromFile
(
"
:/chatview.js
"
),
function
()
{
messageWebView
.
runJavaScript
(
"
init_i18n();
"
)
messageWebView
.
runJavaScript
(
"
displayNavbar(false);
"
)
jsLoaded
=
true
})
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment