Merge lp:~felihommen/unity-scope-calculator/fix into lp:unity-scope-calculator

Proposed by Felipe Hommen
Status: Needs review
Proposed branch: lp:~felihommen/unity-scope-calculator/fix
Merge into: lp:unity-scope-calculator
Diff against target: 45 lines (+9/-10)
1 file modified
src/unity_calculator_daemon.py (+9/-10)
To merge this branch: bzr merge lp:~felihommen/unity-scope-calculator/fix
Reviewer Review Type Date Requested Status
Submarine Pending
Review via email: mp+306032@code.launchpad.net

Commit message

Removed string translation from ',' to '.'; Fixes #1333795

Description of the change

Removed string translation from ',' to '.'
Calculator expects decimal separator in localized form, so changing ',' to '.' breaks decimal point calculations in languages like spanish

To post a comment you must log in.

Unmerged revisions

45. By Felipe Hommen

Removed <search = search.replace(',','.')> which breaks decimal point operations where ',' is the decimal separator

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/unity_calculator_daemon.py'
2--- src/unity_calculator_daemon.py 2014-03-28 08:53:20 +0000
3+++ src/unity_calculator_daemon.py 2016-09-17 18:37:06 +0000
4@@ -2,16 +2,16 @@
5 # -*- coding: utf-8 -*-
6
7 # Copyright (C) 2013 David Callé <davidc@framli.eu>
8-# This program is free software: you can redistribute it and/or modify it
9-# under the terms of the GNU General Public License version 3, as published
10+# This program is free software: you can redistribute it and/or modify it
11+# under the terms of the GNU General Public License version 3, as published
12 # by the Free Software Foundation.
13-#
14-# This program is distributed in the hope that it will be useful, but
15-# WITHOUT ANY WARRANTY; without even the implied warranties of
16-# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
17+#
18+# This program is distributed in the hope that it will be useful, but
19+# WITHOUT ANY WARRANTY; without even the implied warranties of
20+# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
21 # PURPOSE. See the GNU General Public License for more details.
22-#
23-# You should have received a copy of the GNU General Public License along
24+#
25+# You should have received a copy of the GNU General Public License along
26 # with this program. If not, see <http://www.gnu.org/licenses/>.
27
28 from gi.repository import Unity, UnityExtras
29@@ -61,7 +61,6 @@
30 '''
31 results = []
32 search = search.replace(' ','')
33- search = search.replace(',','.')
34 search = search.replace('pi','π')
35 search = search.replace('sqrt','√')
36 search = search.replace('"','')
37@@ -180,7 +179,7 @@
38 '''
39 fs = Unity.FilterSet.new ()
40 # if FILTERS:
41-#
42+#
43 return fs
44
45 def do_get_group_name (self):

Subscribers

People subscribed via source and target branches

to all changes: