Being cursed in Yahweh's sight represents being cursed by Yahweh. AT: "May Yahweh curse the man who rebuilds" (See: [[rc://en/ta/man/translate/figs-metaphor]])
# At the cost of his firstborn son, he will lay the foundation
The consequence of a man laying a new foundation for Jericho is that his firstborn son would die. This is spoken of as if it were a cost that the man would pay. AT: "If he lays the foundation, he will lose his firstborn son" or "If he lays the foundation, his firstborn son will die" (See: [[rc://en/ta/man/translate/figs-metaphor]])
# at the cost of his youngest son, he will set up its gates
The consequence of a man setting up new gates for Jericho is that his youngest son would die. This is spoken of as if it were a cost that the man would pay. AT: "If he sets up its gates, he will lose his youngest son" or "If he sets up it gates, his youngest son will die" (See: [[rc://en/ta/man/translate/figs-metaphor]])
This refers to Joshua's fame, not Yahweh's. Becoming known among the people throughout the land is spoken of as if his fame spread. AT: "Joshua became famous throughout the land" or "people throughout the land learned about Joshua" (See: [[rc://en/ta/man/translate/figs-metaphor]])