Possible meanings are 1) this refers to anytime this happens or 2) this refers to the specific battle that has just happened, "When the leaders took the lead ... the people volunteered."
# when the people volunteer
The word "people" here probably refers to the men old enough to fight, and the word "volunteer" here implies going to war. Alternate translation: "when the men gladly agree to fight in battle" (See: [[rc://en/ta/man/jit/figs-explicit]])
# praise Yahweh
This command is to the people of Israel and so is plural. (See: [[rc://en/ta/man/jit/figs-you]])