Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-25 11:16:11 +01:00

s/Gitea/Forgejo in various log messages and comments

This commit is contained in:
0ko 2024-04-21 21:26:15 +05:00
parent f0f8210279
commit 469c214ec8
19 changed files with 32 additions and 32 deletions

View file

@ -142,7 +142,7 @@ func generate() ([]byte, error) {
} }
} }
// gitea customizations // Forgejo customizations
i, ok := aliasMap["tada"] i, ok := aliasMap["tada"]
if ok { if ok {
data[i].Aliases = append(data[i].Aliases, "hooray") data[i].Aliases = append(data[i].Aliases, "hooray")

View file

@ -150,7 +150,7 @@ func preprocessDatabaseCollation(x *xorm.Engine) {
// check column collation, and show warning/error to end users -- no need to fatal, do not block the startup // check column collation, and show warning/error to end users -- no need to fatal, do not block the startup
if !r.IsCollationCaseSensitive(r.DatabaseCollation) { if !r.IsCollationCaseSensitive(r.DatabaseCollation) {
log.Warn("Current database is using a case-insensitive collation %q, although Gitea could work with it, there might be some rare cases which don't work as expected.", r.DatabaseCollation) log.Warn("Current database is using a case-insensitive collation %q, although Forgejo could work with it, there might be some rare cases which don't work as expected.", r.DatabaseCollation)
} }
if len(r.InconsistentCollationColumns) > 0 { if len(r.InconsistentCollationColumns) > 0 {

View file

@ -660,15 +660,15 @@ func Migrate(x *xorm.Engine) error {
v := currentVersion.Version v := currentVersion.Version
if minDBVersion > v { if minDBVersion > v {
log.Fatal(`Gitea no longer supports auto-migration from your previously installed version. log.Fatal(`Forgejo no longer supports auto-migration from your previously installed version.
Please try upgrading to a lower version first (suggested v1.6.4), then upgrade to this version.`) Please try upgrading to a lower version first (suggested v1.6.4), then upgrade to this version.`)
return nil return nil
} }
// Downgrading Gitea's database version not supported // Downgrading Forgejo database version is not supported
if int(v-minDBVersion) > len(migrations) { if int(v-minDBVersion) > len(migrations) {
msg := fmt.Sprintf("Your database (migration version: %d) is for a newer Gitea, you can not use the newer database for this old Gitea release (%d).", v, minDBVersion+len(migrations)) msg := fmt.Sprintf("Your database (migration version: %d) is for a newer Forgejo, you can not use the newer database for this old Forgejo release (%d).", v, minDBVersion+len(migrations))
msg += "\nGitea will exit to keep your database safe and unchanged. Please use the correct Gitea release, do not change the migration version manually (incorrect manual operation may lose data)." msg += "\nForgejo will exit to keep your database safe and unchanged. Please use the correct Forgejo release, do not change the migration version manually (incorrect manual operation may lose data)."
if !setting.IsProd { if !setting.IsProd {
msg += fmt.Sprintf("\nIf you are in development and really know what you're doing, you can force changing the migration version by executing: UPDATE version SET version=%d WHERE id=1;", minDBVersion+len(migrations)) msg += fmt.Sprintf("\nIf you are in development and really know what you're doing, you can force changing the migration version by executing: UPDATE version SET version=%d WHERE id=1;", minDBVersion+len(migrations))
} }

View file

@ -130,7 +130,7 @@ then resh (ר), and finally heh (ה) (which should appear leftmost).`,
}, },
{ {
// UTF-8/16/32 all use the same codepoint for BOM // UTF-8/16/32 all use the same codepoint for BOM
// Gitea could read UTF-16/32 content and convert into UTF-8 internally then render it, so we only process UTF-8 internally // Forgejo could read UTF-16/32 content and convert into UTF-8 internally then render it, so we only process UTF-8 internally
name: "UTF BOM", name: "UTF BOM",
text: "\xef\xbb\xbftest", text: "\xef\xbb\xbftest",
result: "\xef\xbb\xbftest", result: "\xef\xbb\xbftest",

View file

@ -158,7 +158,7 @@ func Init() {
if err := recover(); err != nil { if err := recover(); err != nil {
log.Error("PANIC whilst initializing repository indexer: %v\nStacktrace: %s", err, log.Stack(2)) log.Error("PANIC whilst initializing repository indexer: %v\nStacktrace: %s", err, log.Stack(2))
log.Error("The indexer files are likely corrupted and may need to be deleted") log.Error("The indexer files are likely corrupted and may need to be deleted")
log.Error("You can completely remove the \"%s\" directory to make Gitea recreate the indexes", setting.Indexer.RepoPath) log.Error("You can completely remove the \"%s\" directory to make Forgejo recreate the indexes", setting.Indexer.RepoPath)
} }
}() }()
@ -176,7 +176,7 @@ func Init() {
if err := recover(); err != nil { if err := recover(); err != nil {
log.Error("PANIC whilst initializing repository indexer: %v\nStacktrace: %s", err, log.Stack(2)) log.Error("PANIC whilst initializing repository indexer: %v\nStacktrace: %s", err, log.Stack(2))
log.Error("The indexer files are likely corrupted and may need to be deleted") log.Error("The indexer files are likely corrupted and may need to be deleted")
log.Error("You can completely remove the \"%s\" index to make Gitea recreate the indexes", setting.Indexer.RepoConnStr) log.Error("You can completely remove the \"%s\" index to make Forgejo recreate the indexes", setting.Indexer.RepoConnStr)
} }
}() }()

View file

@ -55,7 +55,7 @@ func (i *Indexer) Init(_ context.Context) (bool, error) {
} }
if version != 0 { if version != 0 {
log.Warn("Found older bleve index with version %d, Gitea will remove it and rebuild", version) log.Warn("Found older bleve index with version %d, Forgejo will remove it and rebuild", version)
} }
indexMapping, err := i.mappingGetter() indexMapping, err := i.mappingGetter()

View file

@ -62,7 +62,7 @@ func (i *Indexer) checkOldIndexes(ctx context.Context) {
indexName := versionedIndexName(i.indexName, v) indexName := versionedIndexName(i.indexName, v)
exists, err := i.Client.IndexExists(indexName).Do(ctx) exists, err := i.Client.IndexExists(indexName).Do(ctx)
if err == nil && exists { if err == nil && exists {
log.Warn("Found older elasticsearch index named %q, Gitea will keep the old NOT DELETED. You can delete the old version after the upgrade succeed.", indexName) log.Warn("Found older elasticsearch index named %q, Forgejo will keep the old NOT DELETED. You can delete the old version after the upgrade succeed.", indexName)
} }
} }
} }

View file

@ -32,7 +32,7 @@ func (i *Indexer) checkOldIndexes() {
indexName := versionedIndexName(i.indexName, v) indexName := versionedIndexName(i.indexName, v)
_, err := i.Client.GetIndex(indexName) _, err := i.Client.GetIndex(indexName)
if err == nil { if err == nil {
log.Warn("Found older meilisearch index named %q, Gitea will keep the old NOT DELETED. You can delete the old version after the upgrade succeed.", indexName) log.Warn("Found older meilisearch index named %q, Forgejo will keep the old NOT DELETED. You can delete the old version after the upgrade succeed.", indexName)
} }
} }
} }

View file

@ -85,7 +85,7 @@ func InitIssueIndexer(syncReindex bool) {
if err := recover(); err != nil { if err := recover(); err != nil {
log.Error("PANIC whilst initializing issue indexer: %v\nStacktrace: %s", err, log.Stack(2)) log.Error("PANIC whilst initializing issue indexer: %v\nStacktrace: %s", err, log.Stack(2))
log.Error("The indexer files are likely corrupted and may need to be deleted") log.Error("The indexer files are likely corrupted and may need to be deleted")
log.Error("You can completely remove the %q directory to make Gitea recreate the indexes", setting.Indexer.IssuePath) log.Error("You can completely remove the %q directory to make Forgejo recreate the indexes", setting.Indexer.IssuePath)
globalIndexer.Store(dummyIndexer) globalIndexer.Store(dummyIndexer)
log.Fatal("PID: %d Unable to initialize the Bleve Issue Indexer at path: %s Error: %v", os.Getpid(), setting.Indexer.IssuePath, err) log.Fatal("PID: %d Unable to initialize the Bleve Issue Indexer at path: %s Error: %v", os.Getpid(), setting.Indexer.IssuePath, err)
} }

View file

@ -893,7 +893,7 @@ func issueIndexPatternProcessor(ctx *RenderContext, node *html.Node) {
} else { } else {
// Path determines the type of link that will be rendered. It's unknown at this point whether // Path determines the type of link that will be rendered. It's unknown at this point whether
// the linked item is actually a PR or an issue. Luckily it's of no real consequence because // the linked item is actually a PR or an issue. Luckily it's of no real consequence because
// Gitea will redirect on click as appropriate. // Forgejo will redirect on click as appropriate.
path := "issues" path := "issues"
if ref.IsPull { if ref.IsPull {
path = "pulls" path = "pulls"

View file

@ -224,7 +224,7 @@ func getRedisOptions(uri *url.URL) *redis.UniversalOptions {
if db, err := strconv.Atoi(uri.Path[1:]); err == nil { if db, err := strconv.Atoi(uri.Path[1:]); err == nil {
opts.DB = db opts.DB = db
} else { } else {
log.Error("Provided database identifier '%s' is not a valid integer. Gitea will ignore this option.", uri.Path) log.Error("Provided database identifier '%s' is not a valid integer. Forgejo will ignore this option.", uri.Path)
} }
} }

View file

@ -67,8 +67,8 @@ func IsRunUserMatchCurrentUser(runUser string) (string, bool) {
// PrepareAppDataPath creates app data directory if necessary // PrepareAppDataPath creates app data directory if necessary
func PrepareAppDataPath() error { func PrepareAppDataPath() error {
// FIXME: There are too many calls to MkdirAll in old code. It is incorrect. // FIXME: There are too many calls to MkdirAll in old code. It is incorrect.
// For example, if someDir=/mnt/vol1/gitea-home/data, if the mount point /mnt/vol1 is not mounted when Gitea runs, // For example, if someDir=/mnt/vol1/gitea-home/data, if the mount point /mnt/vol1 is not mounted when Forgejo runs,
// then gitea will make new empty directories in /mnt/vol1, all are stored in the root filesystem. // then Forgejo will make new empty directories in /mnt/vol1, all are stored in the root filesystem.
// The correct behavior should be: creating parent directories is end users' duty. We only create sub-directories in existing parent directories. // The correct behavior should be: creating parent directories is end users' duty. We only create sub-directories in existing parent directories.
// For quickstart, the parent directories should be created automatically for first startup (eg: a flag or a check of INSTALL_LOCK). // For quickstart, the parent directories should be created automatically for first startup (eg: a flag or a check of INSTALL_LOCK).
// Now we can take the first step to do correctly (using Mkdir) in other packages, and prepare the AppDataPath here, then make a refactor in future. // Now we can take the first step to do correctly (using Mkdir) in other packages, and prepare the AppDataPath here, then make a refactor in future.
@ -103,7 +103,7 @@ func InitCfgProvider(file string) {
func MustInstalled() { func MustInstalled() {
if !InstallLock { if !InstallLock {
log.Fatal(`Unable to load config file for a installed Gitea instance, you should either use "--config" to set your config file (app.ini), or run "gitea web" command to install Gitea.`) log.Fatal(`Unable to load config file for a installed Forgejo instance, you should either use "--config" to set your config file (app.ini), or run "forgejo web" command to install Forgejo.`)
} }
} }
@ -163,7 +163,7 @@ func loadRunModeFrom(rootCfg ConfigProvider) {
rootSec := rootCfg.Section("") rootSec := rootCfg.Section("")
RunUser = rootSec.Key("RUN_USER").MustString(user.CurrentUsername()) RunUser = rootSec.Key("RUN_USER").MustString(user.CurrentUsername())
// The following is a purposefully undocumented option. Please do not run Gitea as root. It will only cause future headaches. // The following is a purposefully undocumented option. Please do not run Forgejo as root. It will only cause future headaches.
// Please don't use root as a bandaid to "fix" something that is broken, instead the broken thing should instead be fixed properly. // Please don't use root as a bandaid to "fix" something that is broken, instead the broken thing should instead be fixed properly.
unsafeAllowRunAsRoot := ConfigSectionKeyBool(rootSec, "I_AM_BEING_UNSAFE_RUNNING_AS_ROOT") unsafeAllowRunAsRoot := ConfigSectionKeyBool(rootSec, "I_AM_BEING_UNSAFE_RUNNING_AS_ROOT")
unsafeAllowRunAsRoot = unsafeAllowRunAsRoot || util.OptionalBoolParse(os.Getenv("GITEA_I_AM_BEING_UNSAFE_RUNNING_AS_ROOT")).Value() unsafeAllowRunAsRoot = unsafeAllowRunAsRoot || util.OptionalBoolParse(os.Getenv("GITEA_I_AM_BEING_UNSAFE_RUNNING_AS_ROOT")).Value()
@ -183,9 +183,9 @@ func loadRunModeFrom(rootCfg ConfigProvider) {
if os.Getuid() == 0 { if os.Getuid() == 0 {
if !unsafeAllowRunAsRoot { if !unsafeAllowRunAsRoot {
// Special thanks to VLC which inspired the wording of this messaging. // Special thanks to VLC which inspired the wording of this messaging.
log.Fatal("Gitea is not supposed to be run as root. Sorry. If you need to use privileged TCP ports please instead use setcap and the `cap_net_bind_service` permission") log.Fatal("Forgejo is not supposed to be run as root. Sorry. If you need to use privileged TCP ports please instead use setcap and the `cap_net_bind_service` permission")
} }
log.Critical("You are running Gitea using the root user, and have purposely chosen to skip built-in protections around this. You have been warned against this.") log.Critical("You are running Forgejo using the root user, and have purposely chosen to skip built-in protections around this. You have been warned against this.")
} }
} }

View file

@ -136,11 +136,11 @@ func wrapTmplErrMsg(msg string) {
return return
} }
if setting.IsProd { if setting.IsProd {
// in prod mode, Gitea must have correct templates to run // in prod mode, Forgejo must have correct templates to run
log.Fatal("Gitea can't run with template errors: %s", msg) log.Fatal("Forgejo can't run with template errors: %s", msg)
} else { } else {
// in dev mode, do not need to really exit, because the template errors could be fixed by developer soon and the templates get reloaded // in dev mode, do not need to really exit, because the template errors could be fixed by developer soon and the templates get reloaded
log.Error("There are template errors but Gitea continues to run in dev mode: %s", msg) log.Error("There are template errors but Forgejo continues to run in dev mode: %s", msg)
} }
} }

View file

@ -132,7 +132,7 @@ func InitWebInstalled(ctx context.Context) {
if setting.EnableSQLite3 { if setting.EnableSQLite3 {
log.Info("SQLite3 support is enabled") log.Info("SQLite3 support is enabled")
} else if setting.Database.Type.IsSQLite3() { } else if setting.Database.Type.IsSQLite3() {
log.Fatal("SQLite3 support is disabled, but it is used for database setting. Please get or build a Gitea release with SQLite3 support.") log.Fatal("SQLite3 support is disabled, but it is used for database setting. Please get or build a Forgejo release with SQLite3 support.")
} }
mustInitCtx(ctx, common.InitDBEngine) mustInitCtx(ctx, common.InitDBEngine)

View file

@ -212,7 +212,7 @@ func checkDatabase(ctx *context.Context, form *forms.InstallForm) bool {
} }
if hasPostInstallationUser && dbMigrationVersion > 0 { if hasPostInstallationUser && dbMigrationVersion > 0 {
log.Error("The database is likely to have been used by Gitea before, database migration version=%d", dbMigrationVersion) log.Error("The database is likely to have been used by Forgejo before, database migration version=%d", dbMigrationVersion)
confirmed := form.ReinstallConfirmFirst && form.ReinstallConfirmSecond && form.ReinstallConfirmThird confirmed := form.ReinstallConfirmFirst && form.ReinstallConfirmSecond && form.ReinstallConfirmThird
if !confirmed { if !confirmed {
ctx.Data["Err_DbInstalledBefore"] = true ctx.Data["Err_DbInstalledBefore"] = true
@ -220,11 +220,11 @@ func checkDatabase(ctx *context.Context, form *forms.InstallForm) bool {
return false return false
} }
log.Info("User confirmed re-installation of Gitea into a pre-existing database") log.Info("User confirmed re-installation of Forgejo into a pre-existing database")
} }
if hasPostInstallationUser || dbMigrationVersion > 0 { if hasPostInstallationUser || dbMigrationVersion > 0 {
log.Info("Gitea will be installed in a database with: hasPostInstallationUser=%v, dbMigrationVersion=%v", hasPostInstallationUser, dbMigrationVersion) log.Info("Forgejo will be installed in a database with: hasPostInstallationUser=%v, dbMigrationVersion=%v", hasPostInstallationUser, dbMigrationVersion)
} }
return true return true

View file

@ -69,7 +69,7 @@ func QueueSet(ctx *context.Context) {
} }
func QueueRemoveAllItems(ctx *context.Context) { func QueueRemoveAllItems(ctx *context.Context) {
// Gitea's queue doesn't have transaction support // Queue in Forgejo doesn't have transaction support
// So in rare cases, the queue could be corrupted/out-of-sync // So in rare cases, the queue could be corrupted/out-of-sync
// Site admin could remove all items from the queue to make it work again // Site admin could remove all items from the queue to make it work again
qid := ctx.ParamsInt64("qid") qid := ctx.ParamsInt64("qid")

View file

@ -556,7 +556,7 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry) {
// The Open Group Base Specification: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html // The Open Group Base Specification: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html
// empty: 0 lines; "a": 1 incomplete-line; "a\n": 1 line; "a\nb": 1 line, 1 incomplete-line; // empty: 0 lines; "a": 1 incomplete-line; "a\n": 1 line; "a\nb": 1 line, 1 incomplete-line;
// Gitea uses the definition (like most modern editors): // Forgejo uses the definition (like most modern editors):
// empty: 0 lines; "a": 1 line; "a\n": 2 lines; "a\nb": 2 lines; // empty: 0 lines; "a": 1 line; "a\n": 2 lines; "a\nb": 2 lines;
// When rendering, the last empty line is not rendered in UI, while the line-number is still counted, to tell users that the file contains a trailing EOL. // When rendering, the last empty line is not rendered in UI, while the line-number is still counted, to tell users that the file contains a trailing EOL.
// To make the UI more consistent, it could use an icon mark to indicate that there is no trailing EOL, and show line-number as the rendered lines. // To make the UI more consistent, it could use an icon mark to indicate that there is no trailing EOL, and show line-number as the rendered lines.

View file

@ -356,7 +356,7 @@ var slackChannel = regexp.MustCompile(`^#?[a-z0-9_-]{1,80}$`)
// IsValidSlackChannel validates a channel name conforms to what slack expects: // IsValidSlackChannel validates a channel name conforms to what slack expects:
// https://api.slack.com/methods/conversations.rename#naming // https://api.slack.com/methods/conversations.rename#naming
// Conversation names can only contain lowercase letters, numbers, hyphens, and underscores, and must be 80 characters or less. // Conversation names can only contain lowercase letters, numbers, hyphens, and underscores, and must be 80 characters or less.
// Gitea accepts if it starts with a #. // Forgejo accepts if it starts with a #.
func IsValidSlackChannel(name string) bool { func IsValidSlackChannel(name string) bool {
return slackChannel.MatchString(name) return slackChannel.MatchString(name)
} }

View file

@ -99,7 +99,7 @@ export function easyMDEToolbarActions(EasyMDE, editor) {
title: 'Side by Side', title: 'Side by Side',
}, },
// gitea's custom actions // Forgejo custom actions
'gitea-checkbox-empty': { 'gitea-checkbox-empty': {
action(e) { action(e) {
const cm = e.codemirror; const cm = e.codemirror;