wintercms / wintercms/wn-builder-plugin

Add database fields error key with not en locale

Open
#44 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Bug
Dominant language
PHP
Stars
40
Forks
15
PR merge metrics
No merged PRs in 30d

Description

image

Hi, locale ru ~dev-main

Winter\Builder\Behaviors\IndexModelFormOperations:221

$fieldTypes = array_merge(array_keys($controls['Standard']), array_keys($controls['Widgets']));

Standard and Widgets keys apparently taken from lang file

image

I'm not sure but this might work

$standardKey = \Illuminate\Support\Facades\Lang::get('winter.builder::lang.form.control_group_standard');
$widgetKey = \Illuminate\Support\Facades\Lang::get('winter.builder::lang.form.control_group_widgets');
$fieldTypes = array_merge(array_keys($controls[$standardKey]), array_keys($controls[$widgetKey]));

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at Winter\Builder\Behaviors\IndexModelFormOperations around line 221 and inspect how the Standard and Widgets control groups are obtained from the language file. Reproduce the form with the ru locale and verify that database field types are found through the localized group names without breaking the default locale.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, localization
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.