forked from fixin.me/fixin.me
Replace the CLI-only setup (db:seed + manual application.rb edits) with a web wizard shown automatically on first visit when no admin account exists yet. SetupController (GET/POST /setup) collects the admin e-mail and password, a "skip e-mail confirmation" toggle, and an option to seed the built-in default units. Once submitted it creates the admin User, persists the chosen options as Setting records, and redirects to the sign-in page. ApplicationController gains a redirect_to_setup_if_needed before_action that catches every request (including Devise routes) when no admin exists, so a fresh installation always lands on the wizard rather than an empty sign-in form. A new Setting model provides a lightweight key-value store for runtime options that were previously hard-coded in application.rb (e.g. skip_email_confirmation). RegistrationsController now reads that flag from the database instead of from the application config. Seeds.rb is kept for headless / automated deployments and skips admin creation when an admin already exists (idempotent), with a comment pointing to the web wizard as the preferred path. Also extends the SQLite nil-limit fix (|| Float::INFINITY) to the Quantity model, which suffered the same ArgumentError as Unit. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
195 lines
6.1 KiB
YAML
195 lines
6.1 KiB
YAML
en:
|
||
time:
|
||
formats:
|
||
# Format contains non-breaking space: 160.chr(Encoding::UTF_8)
|
||
default: "%Y-%m-%d %H:%M %Z"
|
||
without_tz: "%Y-%m-%d %H:%M"
|
||
errors:
|
||
messages:
|
||
precision_exceeded: must not exceed %{value} significant digits
|
||
scale_exceeded: must not exceed %{value} decimal digits
|
||
activerecord:
|
||
attributes:
|
||
quantity:
|
||
description: Description
|
||
name: Name
|
||
unit:
|
||
base: Base unit
|
||
description: Description
|
||
multiplier: Multiplier
|
||
symbol: Symbol
|
||
user:
|
||
confirmed_at: Confirmed
|
||
created_at: Registered
|
||
email: E-mail
|
||
status: Status
|
||
errors:
|
||
models:
|
||
unit:
|
||
attributes:
|
||
base:
|
||
multilevel_nesting: has to be a top-level unit
|
||
self_reference: of an unit cannot be the unit itself
|
||
user_mismatch: has to belong to the same user as unit
|
||
multiplier:
|
||
equal_to: for a top-level unit has to be 1
|
||
symbol:
|
||
taken: has to be unique
|
||
quantity:
|
||
attributes:
|
||
name:
|
||
taken: has to be unique among siblings
|
||
parent:
|
||
descendant_reference: cannot be changed to any of descendants
|
||
self_reference: of the quantitiy cannot be the quantity itself
|
||
user_mismatch: has to belong to the same user as quantity
|
||
actioncontroller:
|
||
exceptions:
|
||
status:
|
||
bad_request: >
|
||
Server received request it's unable to understand (400 Bad Request).
|
||
This should not happen, please notify site administrator.
|
||
forbidden: >
|
||
You have not been granted access to this action (403 Forbidden).
|
||
This should not happen, please notify site administrator.
|
||
not_found: >
|
||
The record that you requested operation on does not exist (404 Not Found).
|
||
This should not happen, please notify site administrator.
|
||
unprocessable_entity: >
|
||
The request is semantically incorrect and was rejected (422 Unprocessable Entity).
|
||
This should not happen, please notify site administrator.
|
||
helpers:
|
||
label:
|
||
user:
|
||
password_confirmation: 'Retype new password:'
|
||
password_length_hint_html:
|
||
count: '%{minimum_password_length}'
|
||
zero:
|
||
one: <br><em>(%{count} character minimum)</em>
|
||
other: <br><em>(%{count} characters minimum)</em>
|
||
remember_me: 'Remember me:'
|
||
unconfirmed_email_html: >
|
||
Awaiting confirmation for:<br><em>(since %{confirmation_sent_at})</em>
|
||
submit:
|
||
create: Create
|
||
update: Update
|
||
user:
|
||
update: Update profile
|
||
layouts:
|
||
application:
|
||
issue_tracker: Report issue
|
||
revert: Revert
|
||
sign_out: Sign out
|
||
source_code: Get code
|
||
measurements:
|
||
navigation: Measurements
|
||
no_items: There are no measurements taken. You can Add some now.
|
||
form:
|
||
select_quantity: select the measured quantities...
|
||
index:
|
||
new_measurement: Add measurement
|
||
readouts:
|
||
form:
|
||
select_unit: ...
|
||
quantities:
|
||
navigation: Quantities
|
||
no_items: There are no configured quantities. You can Add some or Import from defaults.
|
||
quantity:
|
||
new_subquantity: Child
|
||
destroy: Delete
|
||
index:
|
||
new_quantity: Add quantity
|
||
top_level_drop: Drop here to reposition into top-level quantity
|
||
create:
|
||
success: Created new quantity "%{quantity}"
|
||
update:
|
||
success: Updated quantity "%{quantity}"
|
||
destroy:
|
||
success: Deleted quantity "%{quantity}"
|
||
units:
|
||
navigation: Units
|
||
no_items: There are no configured units. You can Add some or Import from defaults.
|
||
unit:
|
||
new_subunit: Subunit
|
||
destroy: Delete
|
||
index:
|
||
new_unit: Add unit
|
||
import_units: Import
|
||
top_level_drop: Drop here to reposition into top-level unit
|
||
create:
|
||
success: Created new unit "%{unit}"
|
||
update:
|
||
success: Updated unit "%{unit}"
|
||
rebase:
|
||
multiplier_reset: Multiplier of "%{unit}" has been reset to 1, due to repositioning
|
||
destroy:
|
||
success: Deleted unit "%{unit}"
|
||
default:
|
||
units:
|
||
no_items: There are no importable defaults or exportable units.
|
||
unit:
|
||
delete: Delete
|
||
export: Export
|
||
import: Import
|
||
index:
|
||
actions: Actions on defaults
|
||
back: Back to units
|
||
import_all: Import all
|
||
no_items: There are no differences between default and user units.
|
||
import:
|
||
success: Imported unit "%{unit}"
|
||
export:
|
||
success: Exported unit "%{unit}"
|
||
destroy:
|
||
success: Deleted unit "%{unit}"
|
||
users:
|
||
navigation: Users
|
||
index:
|
||
disguise: View as
|
||
passwords:
|
||
edit:
|
||
password_html: 'New password:%{password_length_hint_html}'
|
||
update_password: Update password
|
||
registrations:
|
||
new:
|
||
password_html: 'Password:%{password_length_hint_html}'
|
||
password_confirmation: 'Retype password:'
|
||
edit:
|
||
confirm_delete: Are you sure you want to delete profile?
|
||
All data will be irretrievably lost.
|
||
delete: Delete profile
|
||
password_html: >
|
||
New password:
|
||
<br><em>leave blank to keep unchanged</em>
|
||
%{password_length_hint_html}
|
||
actions: Actions
|
||
setup:
|
||
new:
|
||
admin_account: Admin account
|
||
admin_email: 'E-mail:'
|
||
admin_password: 'Password:'
|
||
admin_password_confirmation: 'Retype password:'
|
||
options: Options
|
||
skip_email_confirmation: Skip e-mail confirmation for new registrations
|
||
seed_units: Seed built-in default units
|
||
submit: Set up
|
||
create:
|
||
email_blank: E-mail cannot be blank.
|
||
password_blank: Password cannot be blank.
|
||
password_mismatch: Passwords do not match.
|
||
success: >
|
||
Installation complete. You can now sign in with the admin account you
|
||
just created.
|
||
add: Add
|
||
apply: Apply
|
||
back: Back
|
||
cancel: Cancel
|
||
delete: Delete
|
||
:no: 'no'
|
||
or: or
|
||
register: Register
|
||
sign_in: Sign in
|
||
recover_password: Recover password
|
||
resend_confirmation: Resend confirmation
|
||
update: Update
|