Skip to content

Commit

Permalink
Merge pull request #1 from kianmeng/fix-typos
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
kipcole9 authored Mar 14, 2022
2 parents da3f01e + 772b8bf commit 6d4aca0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/cldr/trans/gen_function_migration.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if Code.ensure_loaded?(Ecto.Adapters.SQL) do
@moduledoc """
Generates a migration to add a database function
`translate_field` that uses the `Cldr.Trans` structured
transaltion schema to resolve a translation for a field.
translation schema to resolve a translation for a field.
"""

Expand Down
4 changes: 2 additions & 2 deletions lib/cldr/trans/query_builder.ex
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if Code.ensure_loaded?(Ecto.Adapters.SQL) do
## Safety
This macro will emit errors when used with untranslatable schema modules or fields. Errors are
emited during the compilation phase thus avoiding runtime errors after the queries are built.
emitted during the compilation phase thus avoiding runtime errors after the queries are built.
## Examples
Expand Down Expand Up @@ -58,7 +58,7 @@ if Code.ensure_loaded?(Ecto.Adapters.SQL) do
and with [Free-form translations](Transl.html#module-free-form-translations).
In most situations, the queries can be performed in the same way for both cases. **When querying
for data translated into a certain locale we must know wheter we are using structured or
for data translated into a certain locale we must know whether we are using structured or
free-form translations**.
When using structured translations, the translations are saved as an embedded schema. This means
Expand Down
2 changes: 1 addition & 1 deletion lib/cldr_trans.ex
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ defmodule Cldr.Trans do
Although they require less code, **free-form translations provide much less guarantees**:
* There is no way to tell what content and wich form will be stored in the translations field.
* There is no way to tell what content and which form will be stored in the translations field.
* Hard to integrate with HTML forms since the Phoenix helpers are not available.
* Difficult navigation requiring the braces notation from the `Access` protocol.
Expand Down
4 changes: 2 additions & 2 deletions test/trans/query_builder_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ defmodule Cldr.Trans.QueryBuilderTest do

test "should find only one article translated to ES" do
# Articles use nested structs for translations, this means that the translation container
# allways has the locale keys, but they are "null" if empty.
# always has the locale keys, but they are "null" if empty.
count =
Repo.one(
from(
Expand Down Expand Up @@ -321,7 +321,7 @@ defmodule Cldr.Trans.QueryBuilderTest do
assert hd(matches).id == article.id
end

test "should not find an article by a non existant translation" do
test "should not find an article by a non existent translation" do
count =
Repo.one(
from(
Expand Down

0 comments on commit 6d4aca0

Please sign in to comment.