Giter Site home page Giter Site logo

fundraising-frontend-content's Introduction

Fundraising frontend content repository

Build Status

This is a repository for the textual content of the fundraising application.

Content Organization

  • data: Language-independent content that is used internally. Currently it's the black- and whitelists for address fields and comments.
  • i18n: Language-dependent content.
    • de_DE: Sub folders named by language/locale identifier. Each language has a dedicated subdirectory.
      • data: Language-dependent configuration options, like the list of allowed page URLs.
      • mail: Mail template snippets. For mail templates that consist of multiple snippets, the templates are placed in a subdirectory. The files must not contain HTML!
      • messages: JSON files with translations.
      • shared: Content that is used both for E-Mails and in the web application.
      • web: Content that is used in the web application. This content may contain simple, valid HTML.
        • pages: Content for pages defined in data/pages.json
  • resources: Web resources that will be available through the web server, like images or PDFs.
    • ...: Language-independent resources (e.g. logos).
    • de_DE: Sub folders named by language/locale identifier. Each language has a dedicated subdirectory.
      • ...: Language-dependent resources (e.g. documents containing text).

Extracting "Use of funds" content for banners

Banners on wikipedia.org (managed with CentralNotice) need the "Use of funds" content (file data/use_of_funds_content.json) as data attributes in an HTML tag. You can extract the "use of funds" content with the script bin/extract_to_mediawiki. Follow these steps to for each language to make the content available for banners on CentralNotice. The banners will be able to include this content.

  1. Run the script to generate wikitext from the use of funds content. By default, the script will output the generated "Use of funds" MediaWiki page (in wikitext) to the standard output shell. In order to copy this output you can use shell pipes:
bin/extract_to_mediawiki de | xclip -sel c 
#or alternatively, to copy it with a text editor:
bin/extract_to_mediawiki en > tempOutput.txt
  1. Go to the page for "use of funds" content on metaWiki. There are different pages (resources) for each year and each language:
  2. Edit the respective page and paste the output from step 1 and save the changes.

Banners in wikipedia.de currently include the JSON directly.

FAQ

Where to put translations?

If they are very short snippets of text like labels or messages, place them in messages/messages.json. Otherwise, create a file in mail, shared or web.

What HTML tags are allowed?

Have a look at the list of allowed tags in the content provider Repository.

What template syntax is allowed?

Only {% include %} and {$ variable $} statements.

Where is the regex in data/validation.json used?

These are being shared and used for client and server side validation. Currently, they're being used in the following places:

  • The Fundraising Frontend app outputs them as application vars used by Vuejs for client side form validation.
  • They are injected into the Fun Validators AddressValidator for server side validation.

fundraising-frontend-content's People

Contributors

abban avatar aniansson avatar gbirke avatar jeroendedauw avatar jjaquemot avatar kainissen avatar miabuller avatar moiikana avatar sperling-0 avatar tillwmde avatar timeulitz avatar tzhelyazkova avatar wiese avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

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.