diff options
author | Rachit Gupta <rachitgupta1792@gmail.com> | 2014-08-05 22:49:22 +0530 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-08-14 19:43:34 +0200 |
commit | 5a23c290b58bc8b637de55472f85b4b17dded026 (patch) | |
tree | b172afc6768a642b13daa9ecdde0b126b42afa1c /cui | |
parent | 3fcd1064b31af66f5575a27e5ebbf7659d7675bd (diff) |
Removed hardcoded strings.
Replaced the hardcoded strings with their CUI_RES equivalents.
Change-Id: I1f4e0451839cd9fe10aa9d1c5ae82af9fa13dc4e
Diffstat (limited to 'cui')
-rw-r--r-- | cui/AllLangResTarget_cui.mk | 1 | ||||
-rw-r--r-- | cui/source/inc/cuires.hrc | 8 | ||||
-rw-r--r-- | cui/source/options/personalization.cxx | 18 | ||||
-rw-r--r-- | cui/source/options/personalization.src | 52 |
4 files changed, 71 insertions, 8 deletions
diff --git a/cui/AllLangResTarget_cui.mk b/cui/AllLangResTarget_cui.mk index 931fd1f7c9d5..10bf5e6b2035 100644 --- a/cui/AllLangResTarget_cui.mk +++ b/cui/AllLangResTarget_cui.mk @@ -47,6 +47,7 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\ cui/source/options/optjava.src \ cui/source/options/optlingu.src \ cui/source/options/optpath.src \ + cui/source/options/personalization.src \ cui/source/options/treeopt.src \ cui/source/tabpages/border.src \ cui/source/tabpages/frmdirlbox.src \ diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc index 03b5d610d3f4..81f4736fcceb 100644 --- a/cui/source/inc/cuires.hrc +++ b/cui/source/inc/cuires.hrc @@ -425,6 +425,14 @@ #define RID_SVXSTR_EDITHINT (RID_SVX_START + 1266) +// Search Persona Dialog +#define RID_SVXSTR_SEARCHTERM (RID_SVX_START + 1277) +#define RID_SVXSTR_SELECTEDPERSONA (RID_SVX_START + 1278) +#define RID_SVXSTR_SEARCHING (RID_SVX_START + 1279) +#define RID_SVXSTR_SEARCHERROR (RID_SVX_START + 1280) +#define RID_SVXSTR_NORESULTS (RID_SVX_START + 1281) +#define RID_SVXSTR_APPLYPERSONA (RID_SVX_START + 1282) + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx index 90ce9a3f69fc..31e37e11fd4b 100644 --- a/cui/source/options/personalization.cxx +++ b/cui/source/options/personalization.cxx @@ -25,6 +25,8 @@ #include <vcl/svapp.hxx> #include <vcl/settings.hxx> #include <vcl/graphicfilter.hxx> +#include <dialmgr.hxx> +#include "cuires.hrc" #include <com/sun/star/ucb/SimpleFileAccess.hpp> #include <com/sun/star/xml/sax/XParser.hpp> @@ -63,7 +65,7 @@ SelectPersonaDialog::SelectPersonaDialog( Window *pParent ) m_vSearchSuggestions[4]->SetClickHdl( LINK( this, SelectPersonaDialog, SearchPersonas ) ); get( m_pEdit, "search_term" ); - m_pEdit->SetPlaceholderText( "Search term..." ); + m_pEdit->SetPlaceholderText( CUI_RES( RID_SVXSTR_SEARCHTERM ) ); get( m_pProgressLabel, "progress_label" ); @@ -170,7 +172,7 @@ IMPL_LINK( SelectPersonaDialog, SelectPersona, PushButton*, pButton ) // get the persona name from the setting variable to show in the progress. sal_Int32 nNameIndex = m_aSelectedPersona.indexOf( ';' ); OUString aName = m_aSelectedPersona.copy( 0, nNameIndex ); - OUString aProgress( "Selected Persona: " ); + OUString aProgress( CUI_RES( RID_SVXSTR_SELECTEDPERSONA ) ); aProgress += aName; SetProgress( aProgress ); } @@ -542,7 +544,7 @@ void SearchAndParseThread::execute() if( m_aURL.startsWith( "https://" ) ) { m_pPersonaDialog->ClearSearchResults(); - OUString sProgress( "Searching.. Please Wait.." ); + OUString sProgress( CUI_RES( RID_SVXSTR_SEARCHING ) ); m_pPersonaDialog->SetProgress( sProgress ); Reference<XComponentContext> xContext( ::comphelper::getProcessComponentContext() ); Reference< xml::sax::XParser > xParser = xml::sax::Parser::create(xContext); @@ -560,7 +562,7 @@ void SearchAndParseThread::execute() } catch (...) { - sProgress = "Something went wrong. Please try again."; + sProgress = CUI_RES( RID_SVXSTR_SEARCHERROR ); m_pPersonaDialog->SetProgress( sProgress ); return; } @@ -571,7 +573,7 @@ void SearchAndParseThread::execute() if( !pHandler->hasResults() ) { - sProgress = "No results found."; + sProgress = CUI_RES( RID_SVXSTR_NORESULTS ); m_pPersonaDialog->SetProgress( sProgress ); return; } @@ -611,7 +613,7 @@ void SearchAndParseThread::execute() else { - OUString sProgress( "Applying persona.." ); + OUString sProgress( CUI_RES( RID_SVXSTR_APPLYPERSONA ) ); m_pPersonaDialog->SetProgress( sProgress ); uno::Reference< ucb::XSimpleFileAccess3 > xFileAccess( ucb::SimpleFileAccess::create( comphelper::getProcessComponentContext() ), uno::UNO_QUERY ); @@ -660,7 +662,7 @@ void SearchAndParseThread::execute() } catch ( const uno::Exception & ) { - sProgress = "Something went wrong. Please try again."; + sProgress = CUI_RES( RID_SVXSTR_SEARCHERROR ); m_pPersonaDialog->SetProgress( sProgress ); return; } @@ -688,7 +690,7 @@ void SearchAndParseThread::getPreviewFile( const OUString& rURL, OUString *pPrev } catch (...) { - OUString sProgress = "Something went wrong. Please try again."; + OUString sProgress( CUI_RES( RID_SVXSTR_SEARCHERROR ) ); m_pPersonaDialog->SetProgress( sProgress ); return; } diff --git a/cui/source/options/personalization.src b/cui/source/options/personalization.src new file mode 100644 index 000000000000..7cfe7c0a6344 --- /dev/null +++ b/cui/source/options/personalization.src @@ -0,0 +1,52 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include <cuires.hrc> + +String RID_SVXSTR_SEARCHTERM +{ + Text [ en-US ] = "Search term..."; +}; + +String RID_SVXSTR_SELECTEDPERSONA +{ + Text [ en-US ] = "Selected Persona: "; +}; + +String RID_SVXSTR_SEARCHING +{ + Text [ en-US ] = "Searching.. Please Wait.."; +}; + +String RID_SVXSTR_SEARCHERROR +{ + Text [ en-US ] = "Something went wrong. Please try again."; +}; + +String RID_SVXSTR_NORESULTS +{ + Text [ en-US ] = "No results found."; +}; + +String RID_SVXSTR_APPLYPERSONA +{ + Text [ en-US ] = "Applying persona.."; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |