[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: D15115: fix translations kcm to be usable on new users/installations
From: Harald Sitter <noreply () phabricator ! kde ! org>
Date: 2018-08-28 9:18:13
Message-ID: 49133db98ecd1ac7bb84a455565e5be3 () localhost ! localdomain
[Download RAW message or body]
[Attachment #2 (text/plain)]
sitter created this revision.
sitter added a reviewer: hein.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
sitter requested review of this revision.
REVISION SUMMARY
this broke somewhat recently. the new availabletranslationsmodel's
rowcount is always 0 on a completely fresh system with no language
preference set. this is because the actual available languages list is
only compiled in its ::setSelectedLanguages function. this function was
however never called. this resulted in the kcm thinking there are no
available languages and thus making it impossible to actually add one by
disabling the button and having an empty view even if the button wasn't
disabled.
previously this was a single model, from what I can see, and that was
incorrectly ported. where previously the setSelectedLanguages was only
called on one model we now need to call it on all models to properly
propagate the language information.
(the reason it works this way is because available languages kinda need to
include already selected languages for consistency; even when the kcm
technically didn't find them available)
TEST PLAN
- make new user
- start kcm
- kcm DOES NOT show infobox 'no languages installed' and the add languages button \
is enabled
- clicking the button gives a list of languages
- adding one works as well
REPOSITORY
R119 Plasma Desktop
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D15115
AFFECTED FILES
kcms/translations/translations.cpp
To: sitter, hein
Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, \
abetts, sebas, apol, mart
[Attachment #3 (text/html)]
<table><tr><td style="">sitter created this revision.<br />sitter added a reviewer: \
hein.<br />Herald added a project: Plasma.<br />Herald added a subscriber: \
plasma-devel.<br />sitter requested review of this revision. </td><a \
style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; \
color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; \
background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; \
border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D15115">View \
Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>this \
broke somewhat recently. the new availabletranslationsmodel's<br /> rowcount is \
always 0 on a completely fresh system with no language<br /> preference set. this is \
because the actual available languages list is<br /> only compiled in its \
::setSelectedLanguages function. this function was<br /> however never called. this \
resulted in the kcm thinking there are no<br /> available languages and thus making \
it impossible to actually add one by<br /> disabling the button and having an empty \
view even if the button wasn't<br /> disabled.</p>
<p>previously this was a single model, from what I can see, and that was<br />
incorrectly ported. where previously the setSelectedLanguages was only<br />
called on one model we now need to call it on all models to properly<br />
propagate the language information.</p>
<p>(the reason it works this way is because available languages kinda need to<br />
include already selected languages for consistency; even when the kcm<br />
technically didn't find them available)</p></div></div><br /><div><strong>TEST \
PLAN</strong><div><ul class="remarkup-list"> <li class="remarkup-list-item">make new \
user</li> <li class="remarkup-list-item">start kcm</li>
<li class="remarkup-list-item">kcm DOES NOT show infobox 'no languages \
installed' and the add languages button is enabled</li> <li \
class="remarkup-list-item">clicking the button gives a list of languages</li> <li \
class="remarkup-list-item">adding one works as well</li> </ul></div></div><br \
/><div><strong>REPOSITORY</strong><div><div>R119 Plasma Desktop</div></div></div><br \
/><div><strong>BRANCH</strong><div><div>master</div></div></div><br \
/><div><strong>REVISION DETAIL</strong><div><a \
href="https://phabricator.kde.org/D15115">https://phabricator.kde.org/D15115</a></div></div><br \
/><div><strong>AFFECTED \
FILES</strong><div><div>kcms/translations/translations.cpp</div></div></div><br \
/><div><strong>To: </strong>sitter, hein<br /><strong>Cc: </strong>plasma-devel, \
ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, \
apol, mart<br /></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic