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
=== modified file 'src/unity_calculator_daemon.py'
--- src/unity_calculator_daemon.py 2014-03-28 08:53:20 +0000
+++ src/unity_calculator_daemon.py 2016-09-17 18:37:06 +0000
@@ -2,16 +2,16 @@
2# -*- coding: utf-8 -*-2# -*- coding: utf-8 -*-
33
4# Copyright (C) 2013 David Callé <davidc@framli.eu>4# Copyright (C) 2013 David Callé <davidc@framli.eu>
5# This program is free software: you can redistribute it and/or modify it 5# This program is free software: you can redistribute it and/or modify it
6# under the terms of the GNU General Public License version 3, as published 6# under the terms of the GNU General Public License version 3, as published
7# by the Free Software Foundation.7# by the Free Software Foundation.
8# 8#
9# This program is distributed in the hope that it will be useful, but 9# This program is distributed in the hope that it will be useful, but
10# WITHOUT ANY WARRANTY; without even the implied warranties of 10# WITHOUT ANY WARRANTY; without even the implied warranties of
11# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
12# PURPOSE. See the GNU General Public License for more details.12# PURPOSE. See the GNU General Public License for more details.
13# 13#
14# You should have received a copy of the GNU General Public License along 14# You should have received a copy of the GNU General Public License along
15# with this program. If not, see <http://www.gnu.org/licenses/>.15# with this program. If not, see <http://www.gnu.org/licenses/>.
1616
17from gi.repository import Unity, UnityExtras17from gi.repository import Unity, UnityExtras
@@ -61,7 +61,6 @@
61 '''61 '''
62 results = []62 results = []
63 search = search.replace(' ','')63 search = search.replace(' ','')
64 search = search.replace(',','.')
65 search = search.replace('pi','π')64 search = search.replace('pi','π')
66 search = search.replace('sqrt','√')65 search = search.replace('sqrt','√')
67 search = search.replace('"','')66 search = search.replace('"','')
@@ -180,7 +179,7 @@
180 '''179 '''
181 fs = Unity.FilterSet.new ()180 fs = Unity.FilterSet.new ()
182# if FILTERS:181# if FILTERS:
183# 182#
184 return fs183 return fs
185184
186 def do_get_group_name (self):185 def do_get_group_name (self):

Subscribers

People subscribed via source and target branches

to all changes: