Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/bitmessagekivy/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.PHONY: po mo

po:
xgettext -Lpython --output=messages.pot main.py lang.kv
msgmerge --update --no-fuzzy-matching --backup=off po/en.po messages.pot
msgmerge --update --no-fuzzy-matching --backup=off po/fr.po messages.pot

mo:
mkdir -p data/locales/en/LC_MESSAGES
mkdir -p data/locales/fr/LC_MESSAGES
msgfmt -c -o data/locales/en/LC_MESSAGES/langapp.mo po/en.po
msgfmt -c -o data/locales/fr/LC_MESSAGES/langapp.mo po/fr.po
2 changes: 1 addition & 1 deletion src/bitmessagekivy/get_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ def _get_platform():
Other camera provider such as `gi` has some issue upon closing the camera.
by setting KIVY_CAMERA environment variable before importing kivy, we are forcing it to use opencv camera provider.
"""
environ["KIVY_CAMERA"] = "opencv"
environ["KIVY_CAMERA"] = "opencv"
6 changes: 3 additions & 3 deletions src/bitmessagekivy/kv/chat_list.kv
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
tab_display_mode:'text'

Tab:
text: "Chats"
text: app.tr._("Chats")
BoxLayout:
id: chat_box
orientation: 'vertical'
Expand All @@ -23,7 +23,7 @@
MDLabel:
font_style: 'Caption'
theme_text_color: 'Primary'
text: 'No Chat'
text: app.tr._('No Chat')
halign: 'center'
size_hint_y: None
bold: True
Expand All @@ -47,7 +47,7 @@
# ImageLeftWidget:
# source: './images/text_images/A.png'
Tab:
text: "Contacts"
text: app.tr._("Contacts")
BoxLayout:
id: contact_box
orientation: 'vertical'
Expand Down
2 changes: 1 addition & 1 deletion src/bitmessagekivy/kv/chat_room.kv
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
on_text_validate: root.send_msg()

MDRaisedButton:
text: "Send"
text: app.tr._("Send")
elevation_normal: 2
opposite_colors: True
size_hint: (0.3, 1)
Expand Down
39 changes: 25 additions & 14 deletions src/bitmessagekivy/kv/composer.kv
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
BoxLayout:
orientation: 'vertical'
size_hint_y: None
height: self.minimum_height + 2 * self.parent.height/4
height: self.minimum_height + 3 * self.parent.height/4
padding: dp(20)
spacing: 15
BoxLayout:
Expand Down Expand Up @@ -51,14 +51,17 @@
size_hint_y: None
font_size: '15sp'
height: self.parent.height/2
hint_text: 'type, select or scan QR code for recipients address'
hint_text: app.tr._('type, select or scan QR code for recipients address')
RV:
id: rv
MDIconButton:
icon: 'qrcode-scan'
pos_hint: {'center_x': 0, 'center_y': .8}
on_release:
app.root.ids.scr_mngr.current = 'scanscreen'
if root.is_camara_attached(): app.root.ids.scr_mngr.current = 'scanscreen'
else: root.camera_alert()
on_press:
app.root.ids.sc23.get_screen('composer')

MyMDTextField:
id: subject
Expand All @@ -73,17 +76,25 @@
Color:
rgba: (0,0,0,1)

MyMDTextField:
id: body
multiline: True
hint_text: 'body'
size_hint_y: None
font_size: '15sp'
required: True
helper_text_mode: "on_error"
canvas.before:
Color:
rgba: (0,0,0,1)
# MyMDTextField:
# id: body
# multiline: True
# hint_text: 'body'
# size_hint_y: None
# font_size: '15sp'
# required: True
# helper_text_mode: "on_error"
# canvas.before:
# Color:
# rgba: (0,0,0,1)
ScrollView:
id: scrlv
TextInput:
id: body
# text: 'srggdfsfhgfg'
hint_text: 'body'
size_hint: 1, None
height: app.window_size[1]/4
BoxLayout:
spacing:50

Expand Down
6 changes: 3 additions & 3 deletions src/bitmessagekivy/kv/credits.kv
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
orientation: 'vertical'
OneLineListTitle:
id: cred
text: "Available Credits"
text: app.tr._("Available Credits")
divider: None
theme_text_color: 'Primary'
_no_ripple_effect: True
long_press_time: 1

OneLineListTitle:
id: cred
text: root.available_credits
text: app.tr._(root.available_credits)
divider: None
font_style: 'H5'
theme_text_color: 'Primary'
Expand All @@ -24,5 +24,5 @@
AnchorLayout:
MDRaisedButton:
height: dp(38)
text: "+Add more credits"
text: app.tr._("+Add more credits")
on_press: app.root.ids.scr_mngr.current = 'payment'
16 changes: 8 additions & 8 deletions src/bitmessagekivy/kv/login.kv
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
size_hint_y: None
height: dp(50)
MDLabel:
text: "Select method to make an address:"
text: app.tr._("Select method to make an address:")
bold: True
halign: "center"
theme_text_color: "Custom"
Expand All @@ -54,7 +54,7 @@
size_hint_x: None
width: dp(200)
MDLabel:
text: "Random Number Generator"
text: app.tr._("Random Number Generator")

AnchorLayout:
size_hint_y: None
Expand All @@ -74,11 +74,11 @@
size_hint_x: None
width: dp(200)
MDLabel:
text: "Pseudo Number Generator"
text: app.tr._("Pseudo Number Generator")
AnchorLayout:
MDFillRoundFlatIconButton:
icon: "chevron-double-right"
text: "Proceed Next"
text: app.tr._("Proceed Next")
on_release:
app.root.ids.scr_mngr.current = 'random'
on_press:
Expand Down Expand Up @@ -160,7 +160,7 @@
size_hint_y: None
height: dp(50)
MDLabel:
text: "Enter a label to generate address for:"
text: app.tr._("Enter a label to generate address for:")
bold: True
halign: "center"
theme_text_color: "Custom"
Expand All @@ -185,7 +185,7 @@
AnchorLayout:
MDFillRoundFlatIconButton:
icon: "chevron-double-right"
text: "Proceed Next"
text: app.tr._("Proceed Next")
on_release: app.root.ids.sc7.generateaddress(app)

Widget:
Expand Down Expand Up @@ -245,7 +245,7 @@
MDLabel:
theme_text_color: "Custom"
text_color: .1,.1,.1,.9
text: root.section_name
text: app.tr._(root.section_name)
bold: True
font_style: "Button"

Expand All @@ -261,4 +261,4 @@
theme_text_color: "Custom"
text_color: 0.3,0.3,0.3,1
font_style: "Body1"
text: root.section_text
text: app.tr._(root.section_text)
10 changes: 5 additions & 5 deletions src/bitmessagekivy/kv/maildetail.kv
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,30 @@
# on_touch_down: root.allclick(self)
OneLineListTitle:
id: subj
text: root.subject
text: app.tr._(root.subject)
divider: None
font_style: 'H5'
theme_text_color: 'Primary'
_no_ripple_effect: True
long_press_time: 1
TwoLineAvatarIconListItem:
id: subaft
text: root.from_addr
secondary_text: 'to ' + root.to_addr
text: app.tr._(root.from_addr)
secondary_text: app.tr._('to ' + root.to_addr)
divider: None
on_press: root.detailedPopup()
BadgeText:
size_hint:(None, None)
size:[120, 140] if app.app_platform == 'android' else [64, 80]
text: root.time_tag
text: app.tr._(root.time_tag)
halign:'center'
font_style:'Caption'
pos_hint: {'center_y': .8}
_txt_right_pad: dp(70)
font_size: '11sp'
MDChip:
size_hint: (.16 if app.app_platform == 'android' else .07 , None)
label: root.page_type
label: app.tr._(root.page_type)
icon: ''
pos_hint: {'center_x': .91 if app.app_platform == 'android' else .95, 'center_y': .3}
radius: 8
Expand Down
2 changes: 1 addition & 1 deletion src/bitmessagekivy/kv/myaddress.kv
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
height: self.minimum_height
MDLabel:
id: tag_label
text: 'My Addresses'
text: app.tr._('My Addresses')
font_style: 'Subtitle2'
FloatLayout:
MDScrollViewRefreshLayout:
Expand Down
24 changes: 12 additions & 12 deletions src/bitmessagekivy/kv/network.kv
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
tab_display_mode:'text'

Tab:
text: "Total connections"
text: app.tr._("Total connections")
ScrollView:
do_scroll_x: False
MDList:
id: ml
size_hint_y: None
height: dp(200)
OneLineListItem:
text: "Total Connections"
text: app.tr._("Total Connections")
BoxLayout:
orientation: 'vertical'
size_hint_y: None
Expand All @@ -27,20 +27,20 @@
pos_hint: {'center_x': .5}
MDLabel:
font_style: 'H6'
text: root.text_variable_1
text: app.tr._(root.text_variable_1)
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
Tab:
text: 'Processes'
text: app.tr._('Processes')
ScrollView:
do_scroll_x: False
MDList:
id: ml
size_hint_y: None
height: dp(500)
OneLineListItem:
text: "person-to-person"
text: app.tr._("person-to-person")
BoxLayout:
orientation: 'vertical'
size_hint_y: None
Expand All @@ -54,12 +54,12 @@
pos_hint: {'center_x': .5}
MDLabel:
font_style: 'H6'
text: root.text_variable_2
text: app.tr._(root.text_variable_2)
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
OneLineListItem:
text: "Brodcast"
text: app.tr._("Brodcast")
BoxLayout:
orientation: 'vertical'
size_hint_y: None
Expand All @@ -73,12 +73,12 @@
pos_hint: {'center_x': .5}
MDLabel:
font_style: 'H6'
text: root.text_variable_3
text: app.tr._(root.text_variable_3)
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
OneLineListItem:
text: "publickeys"
text: app.tr._("publickeys")
BoxLayout:
orientation: 'vertical'
size_hint_y: None
Expand All @@ -92,12 +92,12 @@
pos_hint: {'center_x': .5}
MDLabel:
font_style: 'H6'
text: root.text_variable_4
text: app.tr._(root.text_variable_4)
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
OneLineListItem:
text: "objects"
text: app.tr._("objects")
BoxLayout:
orientation: 'vertical'
size_hint_y: None
Expand All @@ -111,7 +111,7 @@
pos_hint: {'center_x': .5}
MDLabel:
font_style: 'H6'
text: root.text_variable_5
text: app.tr._(root.text_variable_5)
font_size: '13sp'
color: (1,1,1,1)
halign: 'center'
Loading