Giter Club home page Giter Club logo

currency-converter-qml's People

Contributors

gitter-badger avatar tanghus avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

currency-converter-qml's Issues

Fix translations

//: <currency.name>
//~ Context Currency name
QT_TR_NOOP("code_ <currency.code>")

Where <currency.code> is NOT a variable, but the actual currency code: code_EUR.

In the actual list element, use something like text: qsTr("code_" + model.code)

Or don't use Transifex for currency names.

Bling

  • Banner for About page and Harbour. See #15
  • Let last time updated have different text color based on how old result is

Better return values for errors in DB and XMLHttpRequests

Always let response contain 'result' and 'status' and an optional 'message'

'result' being the result of the request, e.g. [{'this':'that'},{'now':'then'}]

{
  'status':'success',
  'result':[{},{},{}...]
}

or

{
  'status':'error',
  'message':'Oops',
  'error:'' // Optional. "Title" of the error
}

Add option to re-download available pairs in Settings

Changed from an option in settings, to a menu item on front page to force refresh of current from currency. That way there is no risk of "loosing" available currencies, and it's more intuitive. I hope.

There is an option to delete cache. Maybe just automatically reload. No need to ask user?
Also because if you delete cache it will work until you close the app. Either re-download automatically or make sure it's done properly on startup. Well both actually.

Graphic corruption on certain currencies (currency pairs?)

https://stackoverflow.com/questions/57944440/use-utf-8-encoded-text-strings-loaded-from-json-file-in-qml-qtquick

I am writing a currency converter for SailfishOS, and have to display the currency symbols like £, $, €. Since RTL languages messes around with my editor (and because I tried to remedy the error), they are UTF-8 encoded. All is fine, except for some currencies (USD JPY BGN CZK DKK GBP HUF PLN RON SEK CHF ISK NOK HRK RUB TRY AUD BRL CAD CNY HKD IDR ILS INR KRW MXN MYR NZD PHP SGD THB ZAR and maybe more). When using them in the UI, they completely corrupt the graphics; slows down the app, hides elements and some times makes the backgound flash red, cyan, green.

I tried using encodeURIComponent and it has had some effect; now the app doesn't completely freeze, but can't exactly be shipped ;)

Examples from currencies.json:

   "CNY": {
      "symbol": "\u00a5", // This is OK
      "num": 156,
      "name": "Chinese Yuan"
   },
   "DKK": {
      "symbol": "\u006b\u0072", // This is OK
      "num": 208,
      "name": "Danish Krone"
   },
   "EUR": {
      "symbol": "\u20AC", // This is OK
      "num": 978,
      "name": "Euro"
   },
   {
   "AUD": {
       "symbol": "\u0024", // This breaks it
       "num": 36,
       "name": "Australian Dollar"
   },
   "IDR": {
       "symbol": "\u0052\u0070", // This breaks it
       "num": 360,
       "name": "Indonesian Rupiah"
   },
   "ILS": {
       "symbol": "\u20aa", // This breaks it
       "num": 376,
       "name": "New Israeli Shekel"
   },
   "NOK": { 
       "symbol": "\u006b\u0072", // This breaks it
       "num": 578,
       "name": "Norwegian Krone"
   },
  "TRY": {
     "symbol": "\u20a4", // This is OK
     "num": 949,
     "name": "Turkish Lira"
  },
  "USD": {
     "symbol": "\u0024", // This breaks it
     "num": 840,
     "name": "US Dollar"
  },
   }

I have tried various ways of using the symbol in the UI; all of them boils down to something like this:

   ListModel {
       id: currencyModel

       var allCurrencies = Currencies.all // loaded from currencies.json

       for(var currency in allCurrencies) {
           allCurrencies[currency].symbol = encodeURIComponent(allCurrencies[currency].symbol)
           append(allCurrencies[currency])
       }
   }

Using it in the UI:

    Label {
        text: decodeURIComponent(currency.symbol)
    }

I'm sure there is something I have overlooked, but I can't figure out what.

Usable without network

The title used to be "Crash when no network!", but I can't reproduce the crash.

The app needs to be usable without network, as long as the currency pairs needed are cached.

Outstanding issues:

  • When network disconnects, the busyindicator starts spinning, and doesn't stop again when a connection is established.
  • What to do if the service if offline? Signal ExchangeProvider to try to load cache again => separate cache loading to own method.

Offline mode

Save quotes to DB and add an offline option to menu.

Mistake in the word Hryvnia (UAH)

Please change the Name of the Ukrainian currency. Hryvnia (UAH) is wrong.
It should be Hryvna (UAH) or better:
Ukrainian Hryvna (UAH).

Load all currencies on startup

Currently:

  • All currencies are loaded from JSON and kept in memory.

TODO:

  • On startup, check if present:
    • If present (in DB); proceed.
  • If not:
    • Load from JSON, insert into DB; proceed.

Pros:

  • Faster load.
  • Smaller memory footprint.

Improve Cover

  • Switch currency action needs to call frontPage.switchCurrencies()
  • Better alignment
  • Currency code smaller font. Make font small based on length of numbers? Numbers bold.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.