vaizard / glued-archived

1 stars 3 forks source link

Vector / worklog #132

Open killua-eu opened 5 years ago

killua-eu commented 5 years ago
  1. ensure user can choose his/her own default language in auth/settings (autodetect browser language to suggest).
  2. Make sure this setting is not null (each user must have this defined)
  3. we'll be using this value to decide what localization to use and as a fallback if language detection fails (see below)
  4. add https://packagist.org/packages/patrickschur/language-detection as a dependency. whenever language is set (i.e. define new vector, add summary -> autodetect language by: creating an api endpoint that accepts text - send with json the content of vector.summary.[].data -> return response -> set vector.summary.[].lang accordingly) - we'll use this method everywere throughout glued in the feature so it might be cool to count on this language detect api endpoint with every rjsf).
  5. add vectors/worklog uri. on this uri, we won't use rjsf but we'll define a certain type of vectors.

add a not required element to schema:

"relationship": {
    "author": {
        data: '$value'
        type: anyof('uid', 'email', 'phone', 'name')
    },
    "participant": [
    {
        data: '$value'
        type: anyof('uid', 'email', 'phone', 'name')
    },
    ...
    ...
    ]
}

the simplified vector for worklog will have:

autofilled & hidden from user:

filled out by user

the ui will look like this:

dt_start | dt_end | duration | summary | duration

People can have to set two of the three (dt_start | dt_end | duration): the third will be autocalcullated.

summary is the stuff that you'll fill in. show work as

Use something like https://yaireo.github.io/tagify/ to support @ prefix to tag users and # to tag vectors (autosuggest). Once we got this working, also parse the summary (and description) text to look for this data and autofill some tables.

pohadkar commented 5 years ago

jazyk browseru je posilany v promenne: $_SERVER['HTTP_ACCEPT_LANGUAGE'] browser posila preferovane nebo nejcasteji pouzivane jazyky, v retezci ktery ma tvar: "cs,sk;q=0.8,en-US;q=0.5,en;q=0.3" php ma funkci locale_accept_from_http(), ktera z toho umi vytahnout prvni jazyk. v tomto pripade funkce vytahla jazyk s kodem "cs"

pohadkar commented 5 years ago

jazyk pridavam jako novy sloupecek c_language char 2 do tabulky t_users, s defaultni hodnotou "en", pro nove zalozene uzivatele

pohadkar commented 5 years ago

dale k bodu 4, language detection plugin nainstaluju composerem a vytvorim api kteremu se posle text a on vrati jazyk. bud tim language detection, nebo tim default nastavenym uzivatele. toto api se bude volat primo z rozepsaneho formulare, pred odeslanim.