Git Product home page Git Product logo

cramkle's Introduction

Cramkle

CI

Cramkle is a web-based flashcard studying app that helps you organize your study using a spaced repetition algorithm, used in many flashcard apps and learning websites, such as Anki and SuperMemo.

Getting started

If you want to access the Cloud version of Cramkle, go to www.cramkle.com, else you can follow the instructions below.

git clone https://github.com/cramkle/cramkle
cd cramkle

# Install dependencies
yarn

# Compile messages translations
yarn compile

If you want to run this project locally, you will also need to setup and run Hipocampo, which is our GraphQL API.

Development

Now that you've setup all the dependencies for both this project and Hipocampo, you can run the local server with the command below.

yarn dev

Adding and updating translations

This project uses lingui-js for i18n. In case you need to translate something that isn't yet translated, or you are adding some new texts, you'll need to use one of the macros from the lingui package. Lingui comes with several macros to handle all sorts of cases of language translation, but the most common one is just plain text. For simple texts, you can use either the Trans macro or the t macro (in conjunction with the useLingui hook).

Now, to translate something you can just wrap it up with one of lingui macros, like one of the two above:

import { Trans, t } from '@lingui/macro'
import { useLingui } from '@lingui/react'
import React from 'react'

const ComponentWithTrans = () => {
  return (
    <span>
      <Trans>My translated text</Trans>
    </span>
  )
}

const ComponentWithUseLingui = () => {
  const { i18n } = useLingui()

  return (
    <span>
      {i18n._(t`My translated text`)}
    </span>
  )
}

After adding the macro to the component like in the example above, you'll need to run yarn extract so lingui an extract those texts into PO files (under ./src/locales/). Then, edit the translation in the corresponding files and run yarn compile. You can see more info and other examples on the Lingui docs.

cramkle's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar edzzn avatar lucasecdb avatar thalytafabrine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cramkle's Issues

Implement account deletion

Is your feature request related to a problem? Please describe.
I would like to be able to delete my account and all associated data.

Describe the solution you'd like
A button in settings to delete my account.

Describe alternatives you've considered
It seems there are no alternatives.

Login using cached home page

after the user logs in, they are redirected to the home page (the / path), but the browser is serving up the cached page because we now have a service worker that cached it.

Re-enable add deck form enter keydown test

This issue refers to the following commit c901d1c, where I disabled one test which submitted the form using an enter keypress, but I don't know how to get it working. Maybe it's worth waiting for the 16.9 release of react-dom

Split server and app into separate packages

It's really annoying to have the server and app sharing the same package.json. Also they used to share the same tsconfig.json too, but some editors don't load the correct one for the server, as it doesn't follow the common naming convention.

The only problem I see upfront of separating those into different "packages" would be to how the server would find the clients build folder, for serving during development, and how to create the docker image for them.

Prevent window reload on language change when offline

should not reload the window when the user changes the language in settings while offline, as this will cause the browser to request a page that isn't cached by the service worker and display the default offline page.

Error studying Installed deck

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Create an annonymous account
  2. Go to the marketplace
  3. Import a Deck
  4. Try to study it
  5. See error

Expected behavior
You should see the flashcards

Desktop (please complete the following information):

  • OS: macOS
  • Browser: chrome
  • Version: 96.0.4664.93

Additional context

[GraphQL error]: Message Key not found : 61b7fd7d3c305c94f26dc385, Location: [object Object], Path studyFlashCard,note

LaTeX or MathJax

Either LaTeX support or MathJax would make cramkle more appealing to a scienctific audience.

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.