Skip to content

Commit

Permalink
[core] English corrections of user text
Browse files Browse the repository at this point in the history
  • Loading branch information
annmcctw authored and romainr committed Jul 27, 2012
1 parent 6f685aa commit e99bc2e
Show file tree
Hide file tree
Showing 39 changed files with 122 additions and 121 deletions.
16 changes: 8 additions & 8 deletions apps/beeswax/src/beeswax/conf.py
Expand Up @@ -21,19 +21,19 @@

BEESWAX_SERVER_HOST = Config(
key="beeswax_server_host",
help=_("Host where beeswax server thrift daemon is running"),
help=_("Host where Beeswax server Thrift daemon is running."),
private=True,
default="localhost")

BEESWAX_SERVER_PORT = Config(
key="beeswax_server_port",
help=_("Configure the port the beeswax thrift server runs on"),
help=_("Configure the port the Beeswax Thrift server runs on."),
default=8002,
type=int)

BEESWAX_META_SERVER_HOST = Config(
key="beeswax_meta_server_host",
help=_("Host where beeswax internal metastore thrift daemon is running"),
help=_("Host where Beeswax internal metastore Thrift daemon is running."),
private=True,
default="localhost")

Expand Down Expand Up @@ -65,31 +65,31 @@

BEESWAX_HIVE_CONF_DIR = Config(
key='hive_conf_dir',
help=_('Hive configuration directory, where hive-site.xml is located'),
help=_('Hive configuration directory, where hive-site.xml is located.'),
default=os.environ.get("HIVE_CONF_DIR", '/etc/hive/conf'))

LOCAL_EXAMPLES_DATA_DIR = Config(
key='local_examples_data_dir',
default=os.path.join(os.path.dirname(__file__), "..", "..", "data"),
help=_('The local filesystem path containing the beeswax examples'))
help=_('The local filesystem path containing the Beeswax examples.'))

BEESWAX_SERVER_CONN_TIMEOUT = Config(
key='beeswax_server_conn_timeout',
default=120,
type=int,
help=_('Timeout in seconds for thrift calls to beeswax service'))
help=_('Timeout in seconds for Thrift calls to Beeswax service.'))

METASTORE_CONN_TIMEOUT= Config(
key='metastore_conn_timeout',
default=10,
type=int,
help=_('Timeouts in seconds for thrift calls to the hive metastore. This timeout should take into account that the metastore could talk to an external DB'))
help=_('Timeouts in seconds for Thrift calls to the Hive metastore. This timeout should take into account that the metastore could talk to an external database.'))

BEESWAX_RUNNING_QUERY_LIFETIME = Config(
key='beeswax_running_query_lifetime',
default=604800000L, # 7*24*60*60*1000 (1 week)
type=long,
help=_('Time in seconds for beeswax to persist queries in its cache.'))
help=_('Time in seconds for Beeswax to persist queries in its cache.'))

BROWSE_PARTITIONED_TABLE_LIMIT = Config(
key='browse_partitioned_table_limit',
Expand Down
4 changes: 2 additions & 2 deletions apps/beeswax/src/beeswax/data_export.py
Expand Up @@ -85,10 +85,10 @@ def data_generator(query_model, formatter):
# Someone is reading the results concurrently. Abort.
# But unfortunately, this current generator will produce incomplete data.
if next_row != results.start_row:
msg = _('Error: Potentially incomplete results as an error occur during data retrieval.')
msg = _('Error: Potentially incomplete results as an error occurred during data retrieval.')
yield formatter.format_row([msg])
err = (_('Detected another client retrieving results for %(server_id)s. '
'Expect next row being %(row)s and got %(start_row)s. Aborting') %
'Expected next row to be %(row)s and got %(start_row)s. Aborting') %
{'server_id': query_model.server_id, 'row': next_row, 'start_row': results.start_row})
LOG.error(err)
raise RuntimeError(err)
Expand Down
17 changes: 9 additions & 8 deletions apps/beeswax/src/beeswax/forms.py
Expand Up @@ -43,7 +43,7 @@ class SaveForm(forms.Form):
name = forms.CharField(required=False,
max_length=64,
initial=models.SavedQuery.DEFAULT_NEW_DESIGN_NAME,
help_text=_t('Change the name to save as a new design'))
help_text=_t('Change the name to save as a new design.'))
desc = forms.CharField(required=False, max_length=1024, label=_t("Description"))
save = forms.BooleanField(widget=SubmitButton, required=False)
saveas = forms.BooleanField(widget=SubmitButton, required=False)
Expand Down Expand Up @@ -130,8 +130,9 @@ class FileResourceForm(forms.Form):
("ARCHIVE", "archive"),
("FILE", "file"),
], help_text=_t("Resources to upload with your Hive job." +
" Use 'jar' for UDFs. Use file and archive for "
"side files and MAP/TRANSFORM using. Paths are on HDFS.")
" Use 'jar' for UDFs. Use 'file' and 'archive' for "
"files to be copied and made locally available duirng MAP/TRANSFORM. " +
"Paths are on HDFS.")
)
# TODO(philip): Could upload files here, too. Or merely link
# to upload utility?
Expand Down Expand Up @@ -235,7 +236,7 @@ def _clean_tablename(name):

def _clean_terminator(val):
if val is not None and len(val.decode('string_escape')) != 1:
raise forms.ValidationError(_t('Terminator must be exactly one character'))
raise forms.ValidationError(_t('Terminator must be exactly one character.'))
return val


Expand All @@ -249,7 +250,7 @@ class CreateByImportFileForm(forms.Form):
path = filebrowser.forms.PathField(label=_t("Input File"))
do_import = forms.BooleanField(required=False, initial=True,
label=_t("Import data from file"),
help_text=_t("Automatically load this file into the table after creation"))
help_text=_t("Automatically load this file into the table after creation."))

def clean_name(self):
return _clean_tablename(self.cleaned_data['name'])
Expand All @@ -265,7 +266,7 @@ def clean(self):
# ChoiceOrOtherField doesn't work with required=True
delimiter = self.cleaned_data.get('delimiter')
if not delimiter:
raise forms.ValidationError(_t('Delimiter value is required'))
raise forms.ValidationError(_t('Delimiter value is required.'))
_clean_terminator(delimiter)
return self.cleaned_data

Expand All @@ -275,10 +276,10 @@ def old(self):
chr(int(delimiter))
return int(delimiter)
except ValueError:
raise forms.ValidationError(_t('Delimiter value must be smaller than 256'))
raise forms.ValidationError(_t('Delimiter value must be smaller than 256.'))
val = delimiter.decode('string_escape')
if len(val) != 1:
raise forms.ValidationError(_t('Delimiter must be exactly one character'))
raise forms.ValidationError(_t('Delimiter must be exactly one character.'))
return ord(val)


Expand Down
Expand Up @@ -77,7 +77,7 @@ class Command(NoArgsCommand):
def handle_noargs(self, **options):
"""Main entry point to install examples. May raise InstallException"""
if self._check_installed():
msg = _('Beeswax examples already installed')
msg = _('Beeswax examples already installed.')
LOG.error(msg)
raise InstallException(msg)

Expand Down Expand Up @@ -186,15 +186,15 @@ def create(self, django_user):
try:
# Already exists?
tables = db_utils.meta_client().get_table("default", self.name)
msg = _('Table "%(table)s" already exists') % {'table': self.name}
msg = _('Table "%(table)s" already exists.') % {'table': self.name}
LOG.error(msg)
raise InstallException(msg)
except hive_metastore.ttypes.NoSuchObjectException:
query_msg = _make_query_msg(self.hql)
try:
results = db_utils.execute_and_wait(django_user, query_msg)
if not results:
msg = _('Error creating table %(table)s: Operation timeout') % {'table': self.name}
msg = _('Error creating table %(table)s: Operation timeout.') % {'table': self.name}
LOG.error(msg)
raise InstallException(msg)
except BeeswaxException, ex:
Expand All @@ -218,7 +218,7 @@ def load(self, django_user):
try:
results = db_utils.execute_and_wait(django_user, query_msg)
if not results:
msg = _('Error loading table %(table)s: Operation timeout') % {'table': self.name}
msg = _('Error loading table %(table)s: Operation timeout.') % {'table': self.name}
LOG.error(msg)
raise InstallException(msg)
except BeeswaxException, ex:
Expand All @@ -243,7 +243,7 @@ def install(self, django_user):
try:
# Don't overwrite
model = models.SavedQuery.objects.get(owner=django_user, name=self.name)
msg = _('Sample design %(name)s already exists') % {'name': self.name}
msg = _('Sample design %(name)s already exists.') % {'name': self.name}
LOG.error(msg)
raise InstallException(msg)
except models.SavedQuery.DoesNotExist:
Expand Down
2 changes: 1 addition & 1 deletion apps/beeswax/src/beeswax/models.py
Expand Up @@ -169,7 +169,7 @@ def get(id, owner=None, type=None):
raise PopupException(msg)

if type is not None and design.type != type:
msg = _('Type mismatch for design id %(id)s (owner %(owner)s) - Expects %(expected_type)s got %(real_type)s') % \
msg = _('Type mismatch for design id %(id)s (owner %(owner)s) - Expected %(expected_type)s got %(real_type)s') % \
{'id': id, 'owner': owner, 'expected_type': design.type, 'real_type': type}
LOG.error(msg)
raise PopupException(msg)
Expand Down
10 changes: 5 additions & 5 deletions apps/beeswax/src/beeswax/templates/choose_delimiter.mako
Expand Up @@ -24,13 +24,13 @@ ${commonheader(_('Beeswax: Create table from file'), "beeswax", "100px")}
${layout.menubar(section='tables')}

<div class="container-fluid">
<h1>${_('Create a new table from file')}</h1>
<h1>${_('Create a new table from a file')}</h1>
<div class="row-fluid">
<div class="span3">
<div class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">${_('Actions')}</li>
<li><a href="${ url('beeswax.create_table.import_wizard')}">${_('Create a new table from file')}</a></li>
<li><a href="${ url('beeswax.create_table.import_wizard')}">${_('Create a new table from a file')}</a></li>
<li><a href="${ url('beeswax.create_table.create_table')}">${_('Create a new table manually')}</a></li>
</ul>
</div>
Expand All @@ -47,7 +47,7 @@ ${layout.menubar(section='tables')}
${comps.field(delim_form['file_type'])}
</div>
<fieldset>
<div class="alert alert-info"><h3>${_('Choose A Delimiter')}</h3>
<div class="alert alert-info"><h3>${_('Choose a Delimiter')}</h3>
% if initial:
${_('Beeswax has determined that this file is delimited by')} <strong>${delim_readable}</strong>.
% endif
Expand Down Expand Up @@ -109,7 +109,7 @@ ${layout.menubar(section='tables')}
$(document).ready(function(){
$(".scrollable").width($(".form-actions").width());
$("#id_delimiter_1").css("margin-left","4px").attr("placeholder","${_('Please write here your delimiter')}").hide();
$("#id_delimiter_1").css("margin-left","4px").attr("placeholder","${_('Please type your delimiter here')}").hide();
$("#id_delimiter_0").change(function(){
if ($(this).val() == "__other__"){
$("#id_delimiter_1").show();
Expand All @@ -136,4 +136,4 @@ ${layout.menubar(section='tables')}
});
</script>

${commonfooter()}
${commonfooter()}
8 changes: 4 additions & 4 deletions apps/beeswax/src/beeswax/templates/choose_file.mako
Expand Up @@ -24,13 +24,13 @@ ${layout.menubar(section='tables')}


<div class="container-fluid">
<h1>${_('Create a new table from file')}</h1>
<h1>${_('Create a new table from a file')}</h1>
<div class="row-fluid">
<div class="span3">
<div class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">${_('Actions')}</li>
<li><a href="${ url('beeswax.create_table.import_wizard')}">${_('Create a new table from file')}</a></li>
<li><a href="${ url('beeswax.create_table.import_wizard')}">${_('Create a new table from a file')}</a></li>
<li><a href="${ url('beeswax.create_table.create_table')}">${_('Create a new table manually')}</a></li>
</ul>
</div>
Expand Down Expand Up @@ -67,7 +67,7 @@ ${layout.menubar(section='tables')}
)}
<span class="help-inline">${unicode(file_form["comment"].errors) | n}</span>
<span class="help-block">
${_("Use a table comment to describe your table. For example, you might mention the data's provenance, and any caveats users of this table should expect.")}
${_("Use a table comment to describe your table. For example, you might note the data's provenance and any caveats users need to know.")}
</span>
</div>
</div>
Expand All @@ -91,7 +91,7 @@ ${layout.menubar(section='tables')}
<div class="controls">
${comps.field(file_form["do_import"], render_default=True)}
<span class="help-block">
${_('Check this box if you want to import the data in this file after creating the table definition. Leave it unchecked if you just want to define an empty table.')}
${_('Check this box if you want to import the data in this file after creating the table definition. Leave it unchecked if you want to define an empty table.')}
<div id="fileWillBeMoved" class="alert">
<strong>${_('Warning!')}</strong> ${_('The selected file is going to be moved during the import.')}
</div>
Expand Down
14 changes: 7 additions & 7 deletions apps/beeswax/src/beeswax/templates/create_table_manually.mako
Expand Up @@ -29,7 +29,7 @@ ${layout.menubar(section='tables')}
<div class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">${_('Actions')}</li>
<li><a href="${ url('beeswax.create_table.import_wizard')}">${_('Create a new table from file')}</a></li>
<li><a href="${ url('beeswax.create_table.import_wizard')}">${_('Create a new table from a file')}</a></li>
<li><a href="${ url('beeswax.create_table.create_table')}">${_('Create a new table manually')}</a></li>
</ul>
</div>
Expand Down Expand Up @@ -69,7 +69,7 @@ ${layout.menubar(section='tables')}
)
)}
<p class="help-block">
${_("Use a table comment to describe your table. For example, you might mention the data's provenance, and any caveats users of this table should expect.")}
${_("Use a table comment to describe your table. For example, you might note the data's provenance and any caveats users need to know.")}
</p>
</div>
</div>
Expand Down Expand Up @@ -280,10 +280,10 @@ ${layout.menubar(section='tables')}
<br/><br/>
<fieldset>
<div class="alert alert-info"><h3>${_('Configure Partitions')}</h3>
${_('If your data is naturally partitioned (by, say, date), partitions are a way to tell Hive that data for a specific partition value are stored together.')}
${_('If your data is naturally partitioned (by date, for example), partitions are a way to tell Hive that data for a specific partition value are stored together.')}
${_('Hive establishes a mapping between directories on disk')}
(<em>${_('e.g.')},</em> <code>/user/hive/warehouse/logs/dt=20100101/</code>)
${_('and the data for that day. Partitions are virtual columns; they are not represented in the data themselves, but are determined by the data location. Hive implements query optimizations such that queries that are specific to a single partition need not read the data in other partitions.')}
${_('and the data for that day. Partitions are virtual columns; they are not represented in the data itself, but are determined by the data location. Hive implements query optimizations such that queries that are specific to a single partition need not read the data in other partitions.')}
</div>
% for form in partitions_form.forms:
${render_column(form, True)}
Expand Down Expand Up @@ -500,7 +500,7 @@ ${layout.menubar(section='tables')}
$(".step[href='"+_url.substring(_url.indexOf("#"),_url.length)+"']").click();
}
$("#id_table-field_terminator_1").css("margin-left","4px").attr("placeholder","${_('Write here your field terminator')}").hide();
$("#id_table-field_terminator_1").css("margin-left","4px").attr("placeholder","${_('Type your field terminator here')}").hide();
$("#id_table-field_terminator_0").change(function(){
if ($(this).val() == "__other__"){
$("#id_table-field_terminator_1").show();
Expand All @@ -509,7 +509,7 @@ ${layout.menubar(section='tables')}
$("#id_table-field_terminator_1").hide().nextAll(".error-inline").addClass("hide");
}
});
$("#id_table-collection_terminator_1").css("margin-left","4px").attr("placeholder","${_('Write here your collection terminator')}").hide();
$("#id_table-collection_terminator_1").css("margin-left","4px").attr("placeholder","${_('Type your collection terminator here')}").hide();
$("#id_table-collection_terminator_0").change(function(){
if ($(this).val() == "__other__"){
$("#id_table-collection_terminator_1").show();
Expand All @@ -518,7 +518,7 @@ ${layout.menubar(section='tables')}
$("#id_table-collection_terminator_1").hide().nextAll(".error-inline").addClass("hide");
}
});
$("#id_table-map_key_terminator_1").css("margin-left","4px").attr("placeholder","${_('Write here your map key terminator')}").hide();
$("#id_table-map_key_terminator_1").css("margin-left","4px").attr("placeholder","${_('Type your map key terminator here')}").hide();
$("#id_table-map_key_terminator_0").change(function(){
if ($(this).val() == "__other__"){
$("#id_table-map_key_terminator_1").show();
Expand Down
6 changes: 3 additions & 3 deletions apps/beeswax/src/beeswax/templates/define_columns.mako
Expand Up @@ -24,13 +24,13 @@ ${commonheader(_('Beeswax: Create table from file'), "beeswax", "100px")}
${layout.menubar(section='tables')}

<div class="container-fluid">
<h1>${_('Create a new table from file')}</h1>
<h1>${_('Create a new table from a file')}</h1>
<div class="row-fluid">
<div class="span3">
<div class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">${_('Actions')}</li>
<li><a href="${ url('beeswax.create_table.import_wizard')}">${_('Create a new table from file')}</a></li>
<li><a href="${ url('beeswax.create_table.import_wizard')}">${_('Create a new table from a file')}</a></li>
<li><a href="${ url('beeswax.create_table.create_table')}">${_('Create a new table manually')}</a></li>
</ul>
</div>
Expand Down Expand Up @@ -123,4 +123,4 @@ ${layout.menubar(section='tables')}
});
});
</script>
${commonfooter()}
${commonfooter()}
4 changes: 2 additions & 2 deletions apps/beeswax/src/beeswax/templates/execute.mako
Expand Up @@ -174,7 +174,7 @@ ${layout.menubar(section='query')}
<a class="btn btn-small" data-form-prefix="functions">${_('Add')}</a>
</div>
</li>
<li class="nav-header">${_('Parametrization')}</li>
<li class="nav-header">${_('Parameterization')}</li>
<li>
<label class="checkbox" rel="tooltip" data-original-title="${_("If checked (the default), you can include parameters like $parameter_name in your query, and users will be prompted for a value when the query is run.")}">
<input type="checkbox" id="id_${form.query["is_parameterized"].html_name | n}" name="${form.query["is_parameterized"].html_name | n}" ${extract_field_data(form.query["is_parameterized"]) and "CHECKED" or ""}/>
Expand All @@ -185,7 +185,7 @@ ${layout.menubar(section='query')}
<li>
<label class="checkbox" rel="tooltip" data-original-title="${_("If checked, you will receive an email notification when the query completes.")}">
<input type="checkbox" id="id_${form.query["email_notify"].html_name | n}" name="${form.query["email_notify"].html_name | n}" ${extract_field_data(form.query["email_notify"]) and "CHECKED" or ""}/>
${_("Email me on complete")}
${_("Email upon completion")}
</label>
</li>
</ul>
Expand Down

0 comments on commit e99bc2e

Please sign in to comment.