Skip to content

Commit 971cf58

Browse files
author
github-actions
committed
update with project-syncing action
1 parent 6ff0e19 commit 971cf58

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

locales/en.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Files in the config/locales directory are used for internationalization and
2+
# are automatically loaded by Rails. If you want to use locales other than
3+
# English, add the necessary files in this directory.
4+
#
5+
# To use the locales, use `I18n.t`:
6+
#
7+
# I18n.t "hello"
8+
#
9+
# In views, this is aliased to just `t`:
10+
#
11+
# <%= t("hello") %>
12+
#
13+
# To use a different locale, set it with `I18n.locale`:
14+
#
15+
# I18n.locale = :es
16+
#
17+
# This would use the information in config/locales/es.yml.
18+
#
19+
# To learn more about the API, please read the Rails Internationalization guide
20+
# at https://guides.rubyonrails.org/i18n.html.
21+
#
22+
# Be aware that YAML interprets the following case-insensitive strings as
23+
# booleans: `true`, `false`, `on`, `off`, `yes`, `no`. Therefore, these strings
24+
# must be quoted to be interpreted as strings. For example:
25+
#
26+
# en:
27+
# "yes": yup
28+
# enabled: "ON"
29+
30+
en:
31+
hints:
32+
randomness: This test deals with randomness. If you think your code is correct but the test failed anyway, you might have just gotten unlucky; try running the test a couple more times.
33+
copy_must_match: Make sure that the text exactly matches the target, including capitalization.
34+
button_type: If you're not being sent anywhere when you click submit and you have an attribute `type="button"` on your `<button>` element, try removing it or changing it to `type="submit"`. Also, ensure that the `<button>` is within the `<form></form>`.
35+
label_for_input: Make sure that you have a `for=""` attribute on each `<label>` and that it matches the `id=""` attribute on the corresponding `<input>`; otherwise our test won't know which input goes with which label (and neither would screen readers, etc).
36+
names_for_inputs: |
37+
Give each `<input>` in your form a unique `name=""` attribute.
38+
39+
`name=""` is the crucial, functional attribute of an `<input>` that determines what the user's input gets labeled as in the query string, and therefore what key it gets stored under in the `params` hash, and therefore how you will access it in your next RCAV.
40+
41+
`placeholder=""`, etc, are nice attributes to use on an `<input>` in order to be user-friendly; but `name=""` is the essential one that you _must_ include.
42+
number_to_currency: Rails has a handy helper method called [`number_to_currency()`](https://apidock.com/rails/ActionView/Helpers/NumberHelper/number_to_currency) that is available within `.html.erb` files.
43+
number_to_percentage: Rails has a handy helper method called [`number_to_percentage()`](https://apidock.com/rails/ActionView/Helpers/NumberHelper/number_to_percentage) that is available within `.html.erb` files.
44+
params_are_strings: Raw values from the `params` hash are all `String`s, so you may have to do some conversions using methods like [`.to_i`](https://apidock.com/ruby/String/to_i) or [`.to_f`](https://apidock.com/ruby/String/to_f) or [`Date.parse()`](https://apidock.com/ruby/Date/parse/class) before you perform any computations.
45+
round: Ruby `Float`s have a [`.round()` method](https://apidock.com/ruby/Float/round) that you can use anywhere.
46+
value_attribute: Use the `value=""` attribute to pre-populate an `<input>`.
47+
embed_vs_interpolate: Remember, ERB tags `<%= %>` are only for use within `.html.erb` embedded Ruby HTML view templates. If you're trying to put together a Ruby string (like when you were trying to compose an API URL in Meteorologist), just use `+` or `#{}`.
48+
redirect_vs_render: |
49+
The argument to the `render()` method is **a filename** of a `.html.erb` template file from within our `app/views` folder that we want to use to format the instance variables that we've defined within _this action_.
50+
51+
The argument to the `redirect_to()` method is **a URL** that we want to send the user to which will trigger _a completely different action_.
52+
53+
Don't provide the `redirect_to()` method with a filename as an argument, or the `render()` method with a URL as an argument.

0 commit comments

Comments
 (0)