Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI for form languages and translations #1913

Merged
merged 106 commits into from
Sep 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
e1f48e5
WIP of form translations UI
pmusaraj Jun 15, 2018
803c926
fix broken formLanding in forms without translations
pmusaraj Jun 18, 2018
e9bb4a7
more WIP on adding languages/translations to projets via UI
pmusaraj Jun 18, 2018
6110ab8
more WIP for translations UI, added translation table in a modal
pmusaraj Jun 19, 2018
392a4aa
added translations table UI
pmusaraj Jun 20, 2018
d4832b4
minor cleanup and fixes
pmusaraj Jun 20, 2018
58750d6
fix bug when adding translation of a form without a choice list
pmusaraj Jun 20, 2018
3fb9047
merge from master, fix conflicts, run eslint
pmusaraj Jul 26, 2018
0e05344
minor UI improvements to translations modal
pmusaraj Jul 27, 2018
9d57ed7
merge from form-templates-frontend, fix conflicts, run eslint
pmusaraj Jul 27, 2018
0a9a1de
add modal constants for translation modals
pmusaraj Jul 27, 2018
210caa4
dismantle translations in form builder, WIP
pmusaraj Jul 27, 2018
29c56c9
merge from master, add comment to disabled translation test
pmusaraj Jul 28, 2018
eaff444
fixes to translations table, performance refactoring
pmusaraj Jul 30, 2018
0737552
Merge branch 'master' into translations-formtemplates-merge
pmusaraj Jul 30, 2018
1f5d54e
minor refactoring
pmusaraj Aug 1, 2018
fa8d38d
Merge branch 'master' into translations-formtemplates-merge
magicznyleszek Aug 4, 2018
afc7b24
move projectSettings out of formEditors to separate file - closes #1914
magicznyleszek Aug 4, 2018
3c585c6
make ENTER key work for adding new language
magicznyleszek Aug 5, 2018
10ab1bc
add BACK button to translation table modal
magicznyleszek Aug 5, 2018
c73b527
tiny review changes
magicznyleszek Aug 5, 2018
451e5d0
rename bad bem classname
magicznyleszek Aug 5, 2018
929f8dc
add empty message for nothing to translate
magicznyleszek Aug 6, 2018
6fdd817
more general message
magicznyleszek Aug 6, 2018
2437b85
pass translations variable
magicznyleszek Aug 6, 2018
e861dfc
fix aggressive input type="text" styles by ditching FormModal__item e…
magicznyleszek Aug 6, 2018
fe1207e
save changes pending state
magicznyleszek Aug 6, 2018
622f5e4
stretch react table
magicznyleszek Aug 6, 2018
a86cdae
use currentTarget instead of target to be smart
magicznyleszek Aug 6, 2018
2bcac2b
fix textarea width
magicznyleszek Aug 7, 2018
f0804e9
language name and code validation in form
magicznyleszek Aug 7, 2018
e1c5ae3
use const
magicznyleszek Aug 7, 2018
60f2d79
delete unused file
magicznyleszek Aug 7, 2018
3e4b465
simplify languages list rendering
magicznyleszek Aug 7, 2018
9c7d5d8
fix languages list for null case
magicznyleszek Aug 7, 2018
3fcc7e2
remove code that is better implemented on other branch
magicznyleszek Aug 8, 2018
15131a7
add simple tsts
magicznyleszek Aug 8, 2018
6679127
Merge branch 'master' into translations-formtemplates-merge
magicznyleszek Aug 9, 2018
5191a18
make getLangAsObject and getLangString work together
magicznyleszek Aug 9, 2018
278297d
fix textBox not updating value from props
magicznyleszek Aug 9, 2018
d37d671
Fix label typos
magicznyleszek Aug 9, 2018
855a4a1
safety check for no choices
magicznyleszek Aug 9, 2018
8d93ecb
fix editing first language
magicznyleszek Aug 9, 2018
a2db6d5
disallow adding languages before setting default one
magicznyleszek Aug 9, 2018
da67d78
more general button name
magicznyleszek Aug 9, 2018
927bcd1
leave out one old test that works
magicznyleszek Aug 9, 2018
02ca227
remove code that overwrites first translation to null
magicznyleszek Aug 9, 2018
4176dff
add keys
magicznyleszek Aug 9, 2018
b052ef8
remove unused active_translation_name code
magicznyleszek Aug 10, 2018
ea6a610
remove unused imports
magicznyleszek Aug 10, 2018
049f81f
hack default language translations to not be dropped while saving
magicznyleszek Aug 10, 2018
148de35
use asset content for safe checks
magicznyleszek Aug 10, 2018
8cf6360
fix no choices survey error
magicznyleszek Aug 10, 2018
c30b6c6
fix form not saving
magicznyleszek Aug 10, 2018
343b988
bugfix: normalize jQuery event names for label::language strings
magicznyleszek Aug 10, 2018
eb3c22e
more safety checks for nullifying translatiosn
magicznyleszek Aug 12, 2018
ef8dce7
pass baseSurvey to inputParser when adding from library
magicznyleszek Aug 12, 2018
779b20f
smart merge languages of asset imported from library (still hack though)
magicznyleszek Aug 12, 2018
d69a09b
comment typo
magicznyleszek Aug 12, 2018
fa2e5c6
fix comment
magicznyleszek Aug 12, 2018
150baf1
translation action for library items
magicznyleszek Aug 12, 2018
8f19a2e
TranslationSettings class should be on top of file
magicznyleszek Aug 13, 2018
c623fbf
fix asset loading in translationSettings
magicznyleszek Aug 13, 2018
720d967
render loading message
magicznyleszek Aug 13, 2018
afcd189
fix issue with empty translation
magicznyleszek Aug 13, 2018
bf2ee97
remove old and duplicated alertify overrides (now separate file)
magicznyleszek Aug 13, 2018
ab8692c
better method name
magicznyleszek Aug 13, 2018
33f6609
fallback to null
magicznyleszek Aug 14, 2018
1ed73b2
add make default button (WIP) and improve translation settings modal …
magicznyleszek Aug 14, 2018
98c58a1
fix translation settings for empty form
magicznyleszek Aug 14, 2018
551c3b2
send default_language with form update API call
magicznyleszek Aug 14, 2018
25d1acc
use name and $autoname for imported language missing default label
magicznyleszek Aug 14, 2018
e086c5e
BE call for setting new default language
magicznyleszek Aug 14, 2018
5c5958f
wrong setting name, still doesn't work though
magicznyleszek Aug 14, 2018
7b7919a
wrong property name
magicznyleszek Aug 14, 2018
725a03e
better default label text color
magicznyleszek Aug 14, 2018
27f18b1
try default_language again (because xlsform docs)
magicznyleszek Aug 14, 2018
2134880
Merge branch 'master' into translations-formtemplates-merge
magicznyleszek Aug 15, 2018
99fd8b0
Merge branch 'master' into translations-formtemplates-merge
magicznyleszek Aug 29, 2018
d2e38f9
more visible warning
magicznyleszek Aug 30, 2018
fabe4cf
Merge branch 'master' into translations-formtemplates-merge
magicznyleszek Sep 6, 2018
8b73383
fix after merge
magicznyleszek Sep 6, 2018
726e11f
lang settings modal default lang styles
magicznyleszek Sep 7, 2018
fb93458
update node-sass and webpack-dev-server to fix npm vulnerabilities
pmusaraj Sep 7, 2018
884d6dc
handle forms with languages without lang. code
pmusaraj Sep 7, 2018
b7a2e68
confirm prompt for default language change
magicznyleszek Sep 10, 2018
891227a
be more informative about unnamed translations error
magicznyleszek Sep 10, 2018
5bab4b8
reload asset after failed language update attempt
magicznyleszek Sep 10, 2018
6870675
display error notifications
magicznyleszek Sep 10, 2018
bb453c4
match any translated property
magicznyleszek Sep 10, 2018
554670f
handle multiple translatedProps
magicznyleszek Sep 10, 2018
296e0ff
change error message
magicznyleszek Sep 10, 2018
b028a5e
fix updating default lang
magicznyleszek Sep 11, 2018
30e37bd
Merge pull request #1991 from kobotoolbox/translations-further-changes
pmusaraj Sep 12, 2018
73d1637
improve error message
magicznyleszek Sep 13, 2018
acefb79
typo
magicznyleszek Sep 13, 2018
4603c5d
move nullify translations code to utils function
magicznyleszek Sep 13, 2018
570770a
fix error message test
magicznyleszek Sep 13, 2018
48cb744
add dependency
magicznyleszek Sep 13, 2018
01f8cc0
start writing unit tests for translations hack
magicznyleszek Sep 13, 2018
9b64f6d
more tests, fix no-lang case
magicznyleszek Sep 14, 2018
3f51acc
fix tests data
magicznyleszek Sep 14, 2018
bcacd12
more nullify tests
magicznyleszek Sep 14, 2018
a63c1fb
add two tests for unnulifying
magicznyleszek Sep 15, 2018
cd8ec4f
fix code
magicznyleszek Sep 15, 2018
3994d45
Merge branch 'master' into translations-formtemplates-merge
magicznyleszek Sep 24, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions jsapp/js/actions.es6
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,9 @@ actions.resources.updateAsset.listen(function(uid, values, params={}) {
})
.fail(function(resp){
actions.resources.updateAsset.failed(resp);
if (params.onFailed) {
params.onFailed(resp);
}
});
});

Expand Down
2 changes: 1 addition & 1 deletion jsapp/js/bem.es6
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ bem.FormView__tab = bem.FormView.__('tab', '<a>');
bem.FormView__label = bem.FormView.__('label');
bem.FormView__group = bem.FormView.__('group');
bem.FormView__item = bem.FormView.__('item');
bem.FormView__button = bem.FormView.__('button', '<button>');
bem.FormView__iconButton = bem.FormView.__('icon-button', '<button>');

bem.FormView__row = bem.FormView.__('row');
bem.FormView__cell = bem.FormView.__('cell');
Expand Down
10 changes: 9 additions & 1 deletion jsapp/js/components/assetrow.es6
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ class AssetRow extends React.Component {
<span className='date date--created'>{formatTime(this.props.date_created)}</span>
</bem.AssetRow__cell>
}

{/* "date modified" column */}
<bem.AssetRow__cell
m={'date-modified'}
Expand Down Expand Up @@ -356,6 +355,15 @@ class AssetRow extends React.Component {
{t('Replace project')}
</bem.PopoverMenu__link>
}
{ userCanEdit &&
<bem.PopoverMenu__link
data-action={'translations'}
data-asset-uid={this.props.uid}
>
<i className='k-icon-language' />
{t('Manage translations')}
</bem.PopoverMenu__link>
}
{this.props.downloads.map((dl)=>{
return (
<bem.PopoverMenu__link m={`dl-${dl.format}`} href={dl.url}
Expand Down
Loading