-
-
Notifications
You must be signed in to change notification settings - Fork 76
Develop #234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop #234
Changes from 6 commits
d3d9840
0c9cf49
f881012
c4c2bb5
e4dca46
c5eb24c
97dd5e9
c254862
a82c606
9afc325
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -120,6 +120,18 @@ | |||||||||||||||||||||||||||||||||||||||||||
| <data name="DeleteDepartmentSettingsInfo" xml:space="preserve"> | ||||||||||||||||||||||||||||||||||||||||||||
| <value /> | ||||||||||||||||||||||||||||||||||||||||||||
| </data> | ||||||||||||||||||||||||||||||||||||||||||||
| <data name="GroupDispatchSettingsHeader" xml:space="preserve"> | ||||||||||||||||||||||||||||||||||||||||||||
| <value /> | ||||||||||||||||||||||||||||||||||||||||||||
| </data> | ||||||||||||||||||||||||||||||||||||||||||||
| <data name="UnitDispatchSettingsHeader" xml:space="preserve"> | ||||||||||||||||||||||||||||||||||||||||||||
| <value /> | ||||||||||||||||||||||||||||||||||||||||||||
| </data> | ||||||||||||||||||||||||||||||||||||||||||||
| <data name="UnitDispatchAlsoDispatchToAssignedPersonnelLabel" xml:space="preserve"> | ||||||||||||||||||||||||||||||||||||||||||||
| <value /> | ||||||||||||||||||||||||||||||||||||||||||||
| </data> | ||||||||||||||||||||||||||||||||||||||||||||
| <data name="UnitDispatchAlsoDispatchToGroupLabel" xml:space="preserve"> | ||||||||||||||||||||||||||||||||||||||||||||
| <value /> | ||||||||||||||||||||||||||||||||||||||||||||
| </data> | ||||||||||||||||||||||||||||||||||||||||||||
| <data name="AccountOwner" xml:space="preserve"> | ||||||||||||||||||||||||||||||||||||||||||||
| <value>Propietario de la cuenta</value> | ||||||||||||||||||||||||||||||||||||||||||||
| </data> | ||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -378,16 +390,7 @@ | |||||||||||||||||||||||||||||||||||||||||||
| <data name="DeleteDepartmentSettingsHeader" xml:space="preserve"> | ||||||||||||||||||||||||||||||||||||||||||||
| <value /> | ||||||||||||||||||||||||||||||||||||||||||||
| </data> | ||||||||||||||||||||||||||||||||||||||||||||
| <data name="GroupDispatchSettingsHeader" xml:space="preserve"> | ||||||||||||||||||||||||||||||||||||||||||||
| <value /> | ||||||||||||||||||||||||||||||||||||||||||||
| </data> | ||||||||||||||||||||||||||||||||||||||||||||
| <data name="UnitDispatchSettingsHeader" xml:space="preserve"> | ||||||||||||||||||||||||||||||||||||||||||||
| <value /> | ||||||||||||||||||||||||||||||||||||||||||||
| </data> | ||||||||||||||||||||||||||||||||||||||||||||
| <data name="UnitDispatchAlsoDispatchToAssignedPersonnelLabel" xml:space="preserve"> | ||||||||||||||||||||||||||||||||||||||||||||
| <value /> | ||||||||||||||||||||||||||||||||||||||||||||
| </data> | ||||||||||||||||||||||||||||||||||||||||||||
| <data name="UnitDispatchAlsoDispatchToGroupLabel" xml:space="preserve"> | ||||||||||||||||||||||||||||||||||||||||||||
| <data name="PersonnelOnUnitSetUnitStatusHelp" xml:space="preserve"> | ||||||||||||||||||||||||||||||||||||||||||||
| <value /> | ||||||||||||||||||||||||||||||||||||||||||||
| </data> | ||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+393
to
395
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Add the missing label key for the new PersonnelOnUnitSetUnitStatus setting UI relies on both the Label and Help resources; es.resx currently contains only the Help key. Add the Label key to keep parity and avoid fallback to the default language. Apply this diff to add the missing label adjacent to the help entry: <data name="DeleteDepartmentSettingsHeader" xml:space="preserve">
<value />
</data>
+ <data name="PersonnelOnUnitSetUnitStatusLabel" xml:space="preserve">
+ <value />
+ </data>
<data name="PersonnelOnUnitSetUnitStatusHelp" xml:space="preserve">
<value />
</data>If you want, I can propose Spanish copy for both Label/Help once the final English strings are confirmed. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
Comment on lines
+393
to
395
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chain“PersonnelOnUnitSetUnitStatusHelp” is empty; will display as blank in Spanish Same issue: an empty localized value prevents fallback to neutral/English. Either remove this entry to inherit the English string or populate it. Option A — remove to enable fallback: - <data name="PersonnelOnUnitSetUnitStatusHelp" xml:space="preserve">
- <value />
- </data>Option B — populate with the English help text (from en.resx) for now: <data name="PersonnelOnUnitSetUnitStatusHelp" xml:space="preserve">
- <value />
+ <value>When a unit submits a status and users are setup on roles, the users status will be set to On Unit.</value>
</data>If you prefer, I can also add the Spanish translation in a follow-up, or add a 🏁 Script executed: #!/bin/bash
# Search for the key across all .resx files to verify English fallback value
rg -n 'PersonnelOnUnitSetUnitStatusHelp' -n --glob '*.resx'Length of output: 479 🏁 Script executed: #!/bin/bash
# Extract the English help text for the key from Department.en.resx
rg -A2 -n 'PersonnelOnUnitSetUnitStatusHelp' --glob '*.resx' Core/Resgrid.Localization/Areas/User/Department/Department.en.resxLength of output: 338 Empty Spanish localization entry prevents fallback • File: Core/Resgrid.Localization/Areas/User/Department/Department.es.resx (lines 393–395) Option A — remove the empty entry to enable fallback: - <data name="PersonnelOnUnitSetUnitStatusHelp" xml:space="preserve">
- <value />
- </data>Option B — add the English text as a temporary placeholder: <data name="PersonnelOnUnitSetUnitStatusHelp" xml:space="preserve">
- <value />
+ <value>When a unit submits a status and users are setup on roles, the users status will be set to On Unit.</value>
</data>If you prefer, add a 📝 Committable suggestion
Suggested change
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||
| </root> | ||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| using FluentMigrator; | ||
| using System; | ||
|
|
||
| namespace Resgrid.Providers.Migrations.Migrations | ||
| { | ||
| [Migration(36)] | ||
| public class M0036_AddingUnitStateToActionLogs : Migration | ||
| { | ||
| public override void Up() | ||
| { | ||
| Alter.Table("ActionLogs").AddColumn("UnitStateId").AsInt32().Nullable(); | ||
| Alter.Table("ActionLogs").AddColumn("UnitName").AsString().Nullable(); | ||
| } | ||
|
|
||
| public override void Down() | ||
| { | ||
|
Comment on lines
+11
to
+16
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainImplement Down() and consider explicit length for UnitName for SQL Server parity
Apply this diff: - Alter.Table("ActionLogs").AddColumn("UnitStateId").AsInt32().Nullable();
- Alter.Table("ActionLogs").AddColumn("UnitName").AsString().Nullable();
+ Alter.Table("ActionLogs").AddColumn("UnitStateId").AsInt32().Nullable();
+ Alter.Table("ActionLogs").AddColumn("UnitName").AsString(256).Nullable();And implement Down(): public override void Down()
{
-
+ Delete.Column("UnitName").FromTable("ActionLogs");
+ Delete.Column("UnitStateId").FromTable("ActionLogs");
}🏁 Script executed: #!/bin/bash
set -e
# Locate the migration file for M0036
echo "=== Migration file path ==="
rg -l "M0036_AddingUnitStateToActionLogs" -t cs
# Show the Up() method
echo -e "\n=== Up() method content ==="
rg -n "public override void Up" -A5 -B2 Providers/Resgrid.Providers.Migrations/Migrations/M0036_AddingUnitStateToActionLogs.cs
# Show the Down() method
echo -e "\n=== Down() method content ==="
rg -n "public override void Down" -A3 -B2 Providers/Resgrid.Providers.Migrations/Migrations/M0036_AddingUnitStateToActionLogs.cs
# List other migrations using AsString() without an explicit length
echo -e "\n=== Other AsString() usages without length ==="
rg -n "AsString\\(\\)" -A1 -t cs Providers/Resgrid.Providers.Migrations/MigrationsLength of output: 19647 🏁 Script executed: #!/bin/bash
set -e
# Show the full content of the PG version of the migration
echo "=== PG Migration file content ==="
sed -n '1,200p' Providers/Resgrid.Providers.MigrationsPg/Migrations/M0036_AddingUnitStateToActionLogs.csLength of output: 641 Add reversible Down() methods and specify SQL Server string length
SQL Server migration diff: public override void Up()
{
- Alter.Table("ActionLogs").AddColumn("UnitStateId").AsInt32().Nullable();
- Alter.Table("ActionLogs").AddColumn("UnitName").AsString().Nullable();
+ Alter.Table("ActionLogs").AddColumn("UnitStateId").AsInt32().Nullable();
+ Alter.Table("ActionLogs").AddColumn("UnitName").AsString(256).Nullable();
}
public override void Down()
-{
-}
+{
+ Delete.Column("UnitName").FromTable("ActionLogs");
+ Delete.Column("UnitStateId").FromTable("ActionLogs");
+}PG migration diff: public override void Down()
-{
-}
+{
+ Delete.Column("unitname").FromTable("actionlogs");
+ Delete.Column("unitstateid").FromTable("actionlogs");
+}🤖 Prompt for AI Agents |
||
|
|
||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| using FluentMigrator; | ||
| using System; | ||
|
|
||
| namespace Resgrid.Providers.Migrations.MigrationsPg | ||
| { | ||
| [Migration(35)] | ||
| public class M0035_UpdatingContactsTableAgain : Migration | ||
| { | ||
| public override void Up() | ||
| { | ||
|
|
||
| } | ||
|
|
||
| public override void Down() | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Empty Spanish values will render blank UI; remove to enable fallback or populate with text
Including keys with
<value />in a localized .resx overrides fallback to the neutral/English resource. These four entries will show as empty strings in the Spanish UI. Either remove them (so ResourceManager falls back to English) or populate with text (Spanish or English placeholders).Also, the PR summary claims these entries were later removed in this file, but they are still present here. Please reconcile to avoid drift.
Option A — remove to enable fallback:
Option B — populate with English placeholders to avoid blanks (until Spanish translations are ready):
🏁 Script executed:
Length of output: 527
Empty Spanish entries in Department.es.resx will render blank UI—please remove or populate
The following keys in
Core/Resgrid.Localization/Areas/User/Department/Department.es.resxstill have empty<value/>, which overrides fallback to English and leads to blank labels in the Spanish UI. Additionally, the PR summary states these were removed, but they remain in this file. Please reconcile and then either:• Remove them so ResourceManager falls back to English
• Populate them with placeholder text (Spanish or English) until translations are available
Affected locations:
Option A — remove entries to enable fallback:
Option B — add English placeholders until Spanish copy is ready:
📝 Committable suggestion
🤖 Prompt for AI Agents